Skip to content

Commit 4e91a6c

Browse files
committed
Tweak formatting for @pytest.mark.parametrize
This removes the "fmt: off" / "fmt: on" directives around the `@pytest.mark.parametrize` decoration on test_blob_filter, and reformats it with black, for consistency with other such decorations. The style used there, *if* it could be specified as a rule and thus used without "fmt:" directives, may be nicer than how black formats multi-line mark decorations. However, since that decoration was written, there have been a number of other such decorations, which have been in black style. This also removes the only (or only remaining?) "fmt:" directive in the codebase. As such, it should possibly have been done in gitpython-developers#1760.
1 parent b438c45 commit 4e91a6c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: test/test_blob_filter.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
from git.types import PathLike
1515

1616

17-
# fmt: off
18-
@pytest.mark.parametrize('paths, path, expected_result', [
19-
((Path("foo"),), Path("foo"), True),
20-
((Path("foo"),), Path("foo/bar"), True),
21-
((Path("foo/bar"),), Path("foo"), False),
22-
((Path("foo"), Path("bar")), Path("foo"), True),
23-
])
24-
# fmt: on
17+
@pytest.mark.parametrize(
18+
"paths, path, expected_result",
19+
[
20+
((Path("foo"),), Path("foo"), True),
21+
((Path("foo"),), Path("foo/bar"), True),
22+
((Path("foo/bar"),), Path("foo"), False),
23+
((Path("foo"), Path("bar")), Path("foo"), True),
24+
],
25+
)
2526
def test_blob_filter(paths: Sequence[PathLike], path: PathLike, expected_result: bool) -> None:
2627
"""Test the blob filter."""
2728
blob_filter = BlobFilter(paths)

0 commit comments

Comments
 (0)