Enable RET in flake8 and ruff
This commit is contained in:
parent
007998372f
commit
3bd7dd5772
1 changed files with 30 additions and 5 deletions
|
|
@ -103,6 +103,7 @@ dev = [
|
|||
"flake8-pyproject (>=1.2.4,<2.0.0)",
|
||||
"flake8-pytest-style (>=2.2.0,<3.0.0)",
|
||||
"flake8-quotes (>=3.4.0,<4.0.0)",
|
||||
"flake8-return (>=1.2.0,<2.0.0)",
|
||||
"flake8-sfs (>=1.0.1,<2.0.0)",
|
||||
"flake8-simplify (>=0.31.1,<0.32.0)",
|
||||
"flake8-todos (>=0.3.1,<0.4.0)",
|
||||
|
|
@ -222,6 +223,8 @@ select = [
|
|||
"PT0",
|
||||
# flake8-quotes => use double quotes everywhere (complying with black)
|
||||
"Q0",
|
||||
# flake8-return => Consistent return statements
|
||||
"R5",
|
||||
# flake8-sfs => use f-strings as the only type of string formatting
|
||||
"SFS",
|
||||
# flake8-simplify => Simpler code
|
||||
|
|
@ -257,6 +260,10 @@ extend-ignore = [
|
|||
"E203", "W503",
|
||||
# Let's not do `@pytest.mark.no_cover()` instead of `@pytest.mark.no_cover`.
|
||||
"PT023",
|
||||
# `ruff`'s RET504 does this better, as it allows statements in between.
|
||||
"R504",
|
||||
# An `elif` after a `return` keeps a case distinction together.
|
||||
"R505",
|
||||
# Allow f-strings as the only type of string formatting.
|
||||
"SFS301",
|
||||
# `bool()` around a comparison can be deliberate (`ruff` omits this rule).
|
||||
|
|
@ -480,6 +487,8 @@ select = [
|
|||
"PT",
|
||||
# flake8-quotes => use double quotes everywhere
|
||||
"Q",
|
||||
# flake8-return ("R5") => Consistent return statements
|
||||
"RET",
|
||||
# flake8-bandit => common security issues
|
||||
"S",
|
||||
# flake8-simplify => Simpler code
|
||||
|
|
@ -512,6 +521,8 @@ extend-ignore = [
|
|||
"PLR2004",
|
||||
# Let's not do `@pytest.mark.no_cover()` instead of `@pytest.mark.no_cover`.
|
||||
"PT023",
|
||||
# An `elif` after a `return` keeps a case distinction together.
|
||||
"RET505",
|
||||
# TODOs need neither an author nor an issue.
|
||||
"TD002", "TD003",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue