mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-09 07:25:21 +02:00
fix: Lint Python code with ruff (#3799)
This commit is contained in:
parent
65ece35966
commit
432914e310
41 changed files with 112 additions and 120 deletions
|
@ -139,23 +139,29 @@ target-version = "py310"
|
|||
# Enable Pyflakes `E` and `F` codes by default.
|
||||
ignore = ["F403", "TID252", "B008"]
|
||||
select = [
|
||||
"B", # flake8-bugbear
|
||||
"C4", # McCabe complexity
|
||||
"C90", # flake8-comprehensions
|
||||
"DTZ", # flake8-datetimez
|
||||
"E", # pycodestyles
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"T", # flake8-print
|
||||
"UP", # pyupgrade
|
||||
"B", # flake8-bugbear
|
||||
"DTZ", # flake8-datetimez
|
||||
# "ANN", # flake8-annotations
|
||||
# "C", # McCabe complexity
|
||||
# "RUF", # Ruff specific
|
||||
# "BLE", # blind-except
|
||||
# "RUF", # Ruff specific
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["E402", "E501"]
|
||||
"alembic/versions/2022*" = ["E501"]
|
||||
"alembic/versions/2023*" = ["E501"]
|
||||
"dev/scripts/all_recipes_stress_test.py" = ["E501"]
|
||||
"ldap_provider.py" = ["UP032"]
|
||||
"tests/conftest.py" = ["E402"]
|
||||
"tests/utils/routes/__init__.py" = ["F401"]
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
# Unlike Flake8, default to a complexity level of 10.
|
||||
max-complexity = 10
|
||||
max-complexity = 24 # Default is 10.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue