update tool.ruff configuration to match 2.0 version

This commit is contained in:
Matthias 2024-02-05 18:10:11 +01:00 committed by Joe Schr
parent 3e89343b43
commit 1255517c5f

View File

@ -115,6 +115,8 @@ ignore = ["freqtrade/vendor/**"]
line-length = 100 line-length = 100
extend-exclude = [".env", ".venv"] extend-exclude = [".env", ".venv"]
target-version = "py38" target-version = "py38"
[tool.ruff.lint]
# 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
@ -132,16 +134,17 @@ extend-select = [
# "TCH", # flake8-type-checking # "TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib "PTH", # flake8-use-pathlib
] ]
extend-ignore = [ 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
] ]
[tool.ruff.mccabe] [tool.ruff.lint.mccabe]
max-complexity = 12 max-complexity = 12
[tool.ruff.per-file-ignores] [tool.ruff.lint.per-file-ignores]
"tests/*" = ["S"] "tests/*" = ["S"]
[tool.flake8] [tool.flake8]