Skip to content

Commit

Permalink
Complete "ruff" configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Nov 13, 2024
1 parent 73aa85c commit b7b74bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ select = [
"A",
# flake8-annotations
"ANN",
# flake8-unused-arguments
"ARG",
# flake8-bugbear
"B",
# flake8-blind-except
Expand All @@ -72,12 +74,16 @@ select = [
"FA",
# flake8-boolean-trap
"FBT",
# refurb
"FURB",
# isort
"I",
# flake8-implicit-str-concat
"ISC",
# pep8-naming
"N",
# Perflint
"PERF",
# flake8-pie
"PIE",
# flake8-pytest-style
Expand All @@ -88,6 +94,8 @@ select = [
"RET",
# flake8-raise
"RSE",
# Ruff-specific rules
"RUF",
# flake8-simplify
"SIM",
# flake8-self
Expand All @@ -96,6 +104,8 @@ select = [
"T10",
# flake8-print
"T20",
# flake8-tidy-imports
"TID",
# pyupgrade
"UP",
# pycodestyle
Expand All @@ -119,5 +129,8 @@ order-by-type = false
relative-imports-order = "closest-to-furthest"
split-on-trailing-comma = false

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["RUF018"]

[tool.setuptools.dynamic]
version = { attr = "rithm.__version__" }
4 changes: 2 additions & 2 deletions tests/integer_tests/int_tests/test__eq__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def test_transitivity(first: Int, second: Int, third: Int) -> None:
def test_alternatives(first: Int, second: Int) -> None:
assert equivalence(first == second, first == second)
assert equivalence(first == second, first >= second and first <= second)
assert equivalence(first == second, first >= second and second >= first)
assert equivalence(first == second, first >= second >= first)
assert equivalence(first == second, second <= first and second >= first)
assert equivalence(first == second, second <= first and first <= second)
assert equivalence(first == second, second <= first <= second)


@given(strategies.ints, strategies.ints_with_builtins)
Expand Down
2 changes: 1 addition & 1 deletion tests/meta_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def to_sorted_lists_diff(
try:
while (right_element := next(right_elements)) < left_element:
result.append((None, right_element))
except StopIteration:
except StopIteration: # noqa: PERF203
result.append((left_element, None))
result.extend(
(left_element, None) for left_element in left_elements
Expand Down

0 comments on commit b7b74bf

Please sign in to comment.