1
0
Fork 0
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:
Christian Clauss 2024-08-12 17:09:30 +02:00 committed by GitHub
parent 65ece35966
commit 432914e310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 112 additions and 120 deletions

View file

@ -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.