Skip to content

Commit 621112e

Browse files
committed
Fix linting
1 parent 913ebc5 commit 621112e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test_specifiers.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def test_specifiers(self, version: str, spec_str: str, expected: bool) -> None:
533533
("===foobar", "invalid", False),
534534
],
535535
)
536-
def test_invalid_version(self, spec_str: str, version, expected: str) -> None:
536+
def test_invalid_version(self, spec_str: str, version: str, expected: bool) -> None:
537537
spec = Specifier(spec_str, prereleases=True)
538538
assert spec.contains(version) == expected
539539

@@ -1035,7 +1035,9 @@ def test_empty_specifier(self, version: str) -> None:
10351035
(True, ["foobar", "1.0a1"], ["foobar", "1.0a1"]),
10361036
],
10371037
)
1038-
def test_empty_specifier_arbitrary_string(self, prereleases, versions, expected):
1038+
def test_empty_specifier_arbitrary_string(
1039+
self, prereleases: bool | None, versions: list[str], expected: list[str]
1040+
) -> None:
10391041
"""Test empty SpecifierSet accepts arbitrary strings."""
10401042

10411043
spec = SpecifierSet("", prereleases=prereleases)
@@ -1044,7 +1046,7 @@ def test_empty_specifier_arbitrary_string(self, prereleases, versions, expected)
10441046
assert spec.contains("foobar")
10451047

10461048
# check filter behavior (no override of prereleases passed to filter)
1047-
kwargs = {}
1049+
kwargs: dict[str, bool | None] = {}
10481050
assert list(spec.filter(versions, **kwargs)) == expected
10491051

10501052
def test_create_from_specifiers(self) -> None:
@@ -1757,7 +1759,9 @@ def test_contains_rejects_invalid_specifier(
17571759
("1.5", ">=1.0,!=2.0", True),
17581760
],
17591761
)
1760-
def test_contains_arbitrary_equality_contains(self, version, specifier, expected):
1762+
def test_contains_arbitrary_equality_contains(
1763+
self, version: str, specifier: str, expected: bool
1764+
) -> None:
17611765
spec = SpecifierSet(specifier)
17621766
assert spec.contains(version) == expected
17631767

0 commit comments

Comments
 (0)