From a375e686def7d35afdc5ae9e8231ec6769872cea Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 20 Apr 2024 10:13:14 +0200 Subject: [PATCH] Add some ruff configurations --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0aeab815a..9455d1d0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,6 +122,7 @@ target-version = "py38" # Exclude UP036 as it's causing the "exit if < 3.9" to fail. extend-select = [ "C90", # mccabe + # "B", # bugbear # "N", # pep8-naming "F", # pyflakes "E", # pycodestyle @@ -141,6 +142,7 @@ extend-ignore = [ "E241", # Multiple spaces after comma "E272", # Multiple spaces before keyword "E221", # Multiple spaces before operator + "B007", # Loop control variable not used ] [tool.ruff.lint.mccabe] @@ -149,6 +151,10 @@ max-complexity = 12 [tool.ruff.lint.per-file-ignores] "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] # Default from https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore # minus E226