diff --git a/ruff.toml b/ruff.toml index a9c2b4b01..e696c3627 100644 --- a/ruff.toml +++ b/ruff.toml @@ -35,20 +35,21 @@ target-version = "py312" # Keeping this explicit makes ruff deterministic. select = ["E4", "E7", "E9", "F"] extend-select = [ - "E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent) - "E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces) - "E3", # pycodestyle errors: blank lines / spacing around definitions - "E501", # pycodestyle: line too long (enforced with `line-length` above) - "W", # pycodestyle warnings (various style warnings, often whitespace/newlines) - "I", # import sorting (isort-equivalent) - "RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return) - "UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms) + "E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent) + "E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces) + "E3", # pycodestyle errors: blank lines / spacing around definitions + "E501", # pycodestyle: line too long (enforced with `line-length` above) + "W", # pycodestyle warnings (various style warnings, often whitespace/newlines) + "I", # import sorting (isort-equivalent) + "RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return) + "UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms) + "RUF022", # ruff: enforce sorted `__all__` lists ] ignore = [ - "F403", # pyflakes: `from ... import *` used; unable to detect undefined names - "F405", # pyflakes: name may be undefined or defined from star imports - "RET504", # return: unnecessary assignment before `return` (e.g., `x = expr; return x` -> `return expr`) - "UP032", # pyupgrade: prefer f-strings over `str.format(...)` + "F403", # pyflakes: `from ... import *` used; unable to detect undefined names + "F405", # pyflakes: name may be undefined or defined from star imports + "RET504", # return: unnecessary assignment before `return` (e.g., `x = expr; return x` -> `return expr`) + "UP032", # pyupgrade: prefer f-strings over `str.format(...)` ] preview = true