Enable RUF in ruff
This commit is contained in:
parent
ae2dc8db64
commit
c56fe649b7
1 changed files with 26 additions and 17 deletions
|
|
@ -265,6 +265,8 @@ select = [
|
|||
# "PL",
|
||||
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
||||
# "PTH",
|
||||
# Ruff-specific rules => Fewer bugs and cleaner code
|
||||
# "RUF",
|
||||
# flake8-self => No access to private members from outside
|
||||
# "SLF",
|
||||
# pyupgrade => Modern syntax for the targeted Python version
|
||||
|
|
@ -559,6 +561,8 @@ select = [
|
|||
"PL",
|
||||
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
||||
"PTH",
|
||||
# Ruff-specific rules => Fewer bugs and cleaner code
|
||||
"RUF",
|
||||
# flake8-self => No access to private members from outside
|
||||
"SLF",
|
||||
# flake8-print => no `print()`
|
||||
|
|
@ -576,11 +580,20 @@ extend-ignore = [
|
|||
"PT023",
|
||||
# An `elif` after a `return` keeps a case distinction together.
|
||||
"RET505",
|
||||
# Some "# noqa" comments are only for `flake8`, which `ruff` cannot know.
|
||||
"RUF100",
|
||||
# TODOs need neither an author nor an issue.
|
||||
"TD002", "TD003",
|
||||
]
|
||||
|
||||
|
||||
# Codes only `flake8` knows, kept in "# noqa" comments
|
||||
external = [
|
||||
"B902",
|
||||
"DOC",
|
||||
]
|
||||
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
|
||||
# Top-levels of a sub-packages are intended to import a lot.
|
||||
|
|
|
|||
Loading…
Reference in a new issue