Skip to content

Commit 54bf33e

Browse files
committed
ci: replace black with ruff-format
1 parent 9ada411 commit 54bf33e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+95
-56
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ repos:
44
hooks:
55
- id: ruff
66
args: [--fix]
7-
- repo: https://github.com/ambv/black
8-
rev: 24.10.0
9-
hooks:
10-
- id: black
7+
- id: ruff-format
118
- repo: https://github.com/pre-commit/pre-commit-hooks
129
rev: v5.0.0
1310
hooks:

src/grizzly/args.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class CommonArgs:
6868
)
6969

7070
def __init__(self) -> None:
71-
7271
self.parser = ArgumentParser(
7372
formatter_class=SortingHelpFormatter, conflict_handler="resolve"
7473
)

src/grizzly/common/fuzzmanager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
"""Interface for getting Crash and Bucket data from CrashManager API"""
5+
56
from __future__ import annotations
67

78
import json

src/grizzly/common/reporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ def submit(
115115
Returns:
116116
Implementation specific result indicating where the report was created.
117117
"""
118-
assert (
119-
not test_cases or test_cases[0].timestamp <= test_cases[-1].timestamp
120-
), "tests must be ordered oldest to newest"
118+
assert not test_cases or test_cases[0].timestamp <= test_cases[-1].timestamp, (
119+
"tests must be ordered oldest to newest"
120+
)
121121
self._pre_submit(report)
122122
# output report contents to console
123123
if self.display_logs:

src/grizzly/common/stack_hasher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
crash id (1st hash) and a bug id (2nd hash). This is not perfect but works very
1212
well in most cases.
1313
"""
14+
1415
from __future__ import annotations
1516

1617
from abc import ABC, abstractmethod

src/grizzly/common/status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
"""Manage Grizzly status reports."""
5+
56
from __future__ import annotations
67

78
from abc import ABC

src/grizzly/common/status_reporter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
55
"""Manage Grizzly status reports."""
6+
67
from __future__ import annotations
78

89
from abc import ABC, abstractmethod

src/grizzly/common/test_fuzzmanager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
# pylint: disable=protected-access
55
"""Tests for interface for getting Crash and Bucket data from CrashManager API"""
6+
67
import json
78
from zipfile import ZipFile
89

src/grizzly/common/test_report.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
"""test Grizzly Report"""
5+
56
# pylint: disable=protected-access
67
from pathlib import Path
78

@@ -62,7 +63,7 @@ def test_report_02(tmp_path):
6263
def test_report_03(tmp_path):
6364
"""test Report.tail()"""
6465
tmp_file = tmp_path / "file.txt"
65-
tmp_file.write_bytes(b"blah\ntest\n123\xEF\x00FOO")
66+
tmp_file.write_bytes(b"blah\ntest\n123\xef\x00FOO")
6667
length = tmp_file.stat().st_size
6768
# don't trim
6869
Report.tail(tmp_file, length + 1)

src/grizzly/common/test_reporter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
"""test Grizzly Reporter"""
5+
56
# pylint: disable=protected-access
67
from pathlib import Path
78

0 commit comments

Comments
 (0)