From 118b7b6b4f61e44e53ddec72654ca1d428c6f2cd Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 28 May 2025 19:14:20 +0200 Subject: [PATCH 1/2] Enforce ruff/flake8-implicit-str-concat rules (ISC) --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 717580f82f2..8d4af77b662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,6 +254,7 @@ extend-select = [ "UP", # pyupgrade "B", # flake8-bugbear "C4", # flake8-comprehensions + "ISC", # flake8-implicit-str-concat "PIE", # flake8-pie "TID", # flake8-tidy-imports (absolute imports) "PGH", # pygrep-hooks From db9a9196b64348ab186f552bab908f044c97a223 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 28 May 2025 19:16:10 +0200 Subject: [PATCH 2/2] Use the ruff rule ordering used in the documentation https://docs.astral.sh/ruff/rules/ See also 9b632fd / #9738. --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8d4af77b662..01281a9ce72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -249,16 +249,16 @@ extend-exclude = ["doc", "_typed_ops.pyi"] [tool.ruff.lint] extend-select = [ - "W", # pycodestyle warnings - "I", # isort - "UP", # pyupgrade "B", # flake8-bugbear "C4", # flake8-comprehensions "ISC", # flake8-implicit-str-concat "PIE", # flake8-pie "TID", # flake8-tidy-imports (absolute imports) - "PGH", # pygrep-hooks + "I", # isort "PERF", # Perflint + "W", # pycodestyle warnings + "PGH", # pygrep-hooks + "UP", # pyupgrade "FURB", # refurb "RUF", ] @@ -266,12 +266,12 @@ extend-safe-fixes = [ "TID252", # absolute imports ] ignore = [ - "E402", # module level import not at top of file - "E731", # do not assign a lambda expression, use a def - "UP007", # use X | Y for type annotations "C40", # unnecessary generator, comprehension, or literal "PIE790", # unnecessary pass statement "PERF203", # try-except within a loop incurs performance overhead + "E402", # module level import not at top of file + "E731", # do not assign a lambda expression, use a def + "UP007", # use X | Y for type annotations "FURB105", # unnecessary empty string passed to `print` "RUF001", # string contains ambiguous unicode character "RUF002", # docstring contains ambiguous acute accent unicode character