Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Comment all Ruff rule codes; tweak formatting
This adds comments to all specific Ruff rules suppressed in
pyproject.toml (most of which are global but one is for the tests
only). Some already had such comments but now all do.

This also harmonizes the toml formatting style with the rest of
pyproject.toml.
  • Loading branch information
EliahKagan committed Mar 13, 2024
commit 4814775bfee418d7e0cc9ffb0ac30a4e44a48d75
30 changes: 17 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,28 @@ exclude = [
# Enable Pyflakes `E` and `F` codes by default.
lint.select = [
"E",
"W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
# "I", #see: https://pypi.org/project/isort/
# "S", # see: https://pypi.org/project/flake8-bandit
# "UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # See: https://pypi.org/project/pycodestyle
"F", # See: https://pypi.org/project/pyflakes
# "I", # See: https://pypi.org/project/isort/
# "S", # See: https://pypi.org/project/flake8-bandit
# "UP", # See: https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
lint.extend-select = [
#"A", # see: https://pypi.org/project/flake8-builtins
"B", # see: https://pypi.org/project/flake8-bugbear
"C4", # see: https://pypi.org/project/flake8-comprehensions
"TCH004", # see: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
# "A", # See: https://pypi.org/project/flake8-builtins
"B", # See: https://pypi.org/project/flake8-bugbear
"C4", # See: https://pypi.org/project/flake8-comprehensions
"TCH004", # See: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
]
lint.ignore = [
"E203",
"E731", # Do not assign a `lambda` expression, use a `def`
"E203", # Whitespace before ':'
"E731", # Do not assign a `lambda` expression, use a `def`
]
lint.ignore-init-module-imports = true
lint.unfixable = ["F401"]
lint.unfixable = [
"F401", # Module imported but unused
]

[tool.ruff.lint.per-file-ignores]
"test/**" = ["B018"]
"test/**" = [
"B018", # useless-expression
]