Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion natsort/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion natsort/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_natsorted.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down