updates ruff config

This commit is contained in:
Mose Müller 2023-11-30 09:01:26 +01:00
parent de5340d6fd
commit ad2ae704e9

View File

@ -48,26 +48,40 @@ build-backend = "poetry.core.masonry.api"
[tool.ruff] [tool.ruff]
target-version = "py310" # Always generate Python 3.10-compatible code target-version = "py310" # Always generate Python 3.10-compatible code
line-length = 88 select = [
select = ["ALL"] "ASYNC", # flake8-async
"C4", # flake8-comprehensions
"C901", # mccabe complex-structure
"E", # pycodestyle errors
"ERA", # eradicate
"F", # pyflakes
"FLY", # flynt
"G", # flake8-logging-format
"LOG", # flake8-logging
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"UP", # pyupgrade
"YTT", # flake8-2020
"W", # pycodestyle warnings
]
ignore = [ ignore = [
"ANN101", # typing self "E203", # whitespace-before-punctuation
"ANN401", # disallow Any typing "W292", # missing-newline-at-end-of-file
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling "PERF203", # try-except-in-loop
"COM812", # Missing trailing comma rule; defer to Black for formatting
"E203", # whitespace-before-punctuation
"UP007", # Use `X | Y` for type annotations
"S310", # suspicious-url-open-usage
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"D", # pydocstyle
"EM", # flake8 error messages
"FBT", # Boolean trap detection
"PTH", # flake8-use-pathlib
"SLF", # flake8-self
"TD", # flake8-todos
"TRY", # Exception Handling AntiPatterns in Python
] ]
extend-exclude = [ extend-exclude = [
"docs", "frontend", "tests" "docs", "frontend", "tests"