Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e91a6c

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, andreformats it with black, for consistency with other suchdecorations.The style used there, *if* it could be specified as a rule and thusused without "fmt:" directives, may be nicer than how black formatsmulti-line mark decorations. However, since that decoration waswritten, there have been a number of other such decorations, whichhave been in black style.This also removes the only (or only remaining?) "fmt:" directive inthe codebase. As such, it should possibly have been done in#1760.
1 parentb438c45 commit4e91a6c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

‎test/test_blob_filter.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
fromgit.typesimportPathLike
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
deftest_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)

[8]ページ先頭

©2009-2025 Movatter.jp