diff --git a/natsort/__main__.py b/natsort/__main__.py index 58e9af5..1695278 100644 --- a/natsort/__main__.py +++ b/natsort/__main__.py @@ -37,7 +37,7 @@ class TypedArgs(argparse.Namespace): zero_terminated: bool entries: list[str] - def __init__( # noqa: PLR0913 + def __init__( # noqa: PLR0913, PLR0917 self, filter: list[NumPair] | None = None, reverse_filter: list[NumPair] | None = None, diff --git a/natsort/utils.py b/natsort/utils.py index 01996dd..8e7661f 100644 --- a/natsort/utils.py +++ b/natsort/utils.py @@ -441,7 +441,7 @@ def func( return func -def parse_string_factory( # noqa: PLR0913 +def parse_string_factory( # noqa: PLR0913, PLR0917 alg: NSType, sep: StrOrBytes, splitter: StrSplitter, diff --git a/pyproject.toml b/pyproject.toml index 8170860..50d3709 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ ignore = [ "A002", # arguments shadow builtins "RUF001", # ambiguous-unicode-character-string "COM812", # missing trailing comma + "CPY001", # missing copyright notice "ISC001", # single line implicit string concatenation "PLR0124", # name compared with itself (used to check for NaN) "DTZ", # flaek8-datetimez diff --git a/tests/test_natsorted.py b/tests/test_natsorted.py index 761502e..1bbae53 100644 --- a/tests/test_natsorted.py +++ b/tests/test_natsorted.py @@ -125,11 +125,11 @@ def test_natsorted_handles_mixed_types( ) def test_natsorted_consistent_ordering_with_nan_and_friends( alg: NSType, - expected: list[str | float | None | int], + expected: list[str | float | int | None], ) -> None: sentinel = math.pi expected = [sentinel if x != x else x for x in expected] - given: list[str | float | None | int] = [ + given: list[str | float | int | None] = [ float("inf"), float("-inf"), "25",