Add some ruff configurations
This commit is contained in:
@@ -122,6 +122,7 @@ target-version = "py38"
|
|||||||
# Exclude UP036 as it's causing the "exit if < 3.9" to fail.
|
# Exclude UP036 as it's causing the "exit if < 3.9" to fail.
|
||||||
extend-select = [
|
extend-select = [
|
||||||
"C90", # mccabe
|
"C90", # mccabe
|
||||||
|
# "B", # bugbear
|
||||||
# "N", # pep8-naming
|
# "N", # pep8-naming
|
||||||
"F", # pyflakes
|
"F", # pyflakes
|
||||||
"E", # pycodestyle
|
"E", # pycodestyle
|
||||||
@@ -141,6 +142,7 @@ extend-ignore = [
|
|||||||
"E241", # Multiple spaces after comma
|
"E241", # Multiple spaces after comma
|
||||||
"E272", # Multiple spaces before keyword
|
"E272", # Multiple spaces before keyword
|
||||||
"E221", # Multiple spaces before operator
|
"E221", # Multiple spaces before operator
|
||||||
|
"B007", # Loop control variable not used
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.mccabe]
|
[tool.ruff.lint.mccabe]
|
||||||
@@ -149,6 +151,10 @@ max-complexity = 12
|
|||||||
[tool.ruff.lint.per-file-ignores]
|
[tool.ruff.lint.per-file-ignores]
|
||||||
"tests/*" = ["S"]
|
"tests/*" = ["S"]
|
||||||
|
|
||||||
|
[tool.ruff.lint.flake8-bugbear]
|
||||||
|
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
|
||||||
|
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
|
||||||
|
|
||||||
[tool.flake8]
|
[tool.flake8]
|
||||||
# Default from https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore
|
# Default from https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore
|
||||||
# minus E226
|
# minus E226
|
||||||
|
|||||||
Reference in New Issue
Block a user