| line-length = 160 | |
| target-version = "py312" | |
| [lint] | |
| # Comprehensive rule set replacing pylint + bandit | |
| select = [ | |
| "E", # pycodestyle errors | |
| "W", # pycodestyle warnings | |
| "F", # pyflakes | |
| "I", # isort (import sorting) | |
| "B", # flake8-bugbear | |
| "S", # flake8-bandit (security) | |
| "C4", # flake8-comprehensions | |
| "UP", # pyupgrade | |
| "PL", # pylint | |
| "A", # flake8-builtins | |
| "C90", # mccabe complexity | |
| "N", # pep8-naming | |
| "SIM", # flake8-simplify | |
| "RET", # flake8-return | |
| "ARG", # flake8-unused-arguments | |
| "PTH", # flake8-use-pathlib | |
| "ERA", # eradicate (remove commented code) | |
| "PIE", # flake8-pie | |
| "T20", # flake8-print | |
| "Q", # flake8-quotes | |
| ] | |
| ignore = [ | |
| "SIM108", # Disable ternary conversion - conflicts with explicit if/else requirement | |
| ] | |
| [lint.mccabe] | |
| max-complexity = 10 | |
| [lint.pylint] | |
| max-args = 16 | |
| max-locals = 64 | |
| max-statements = 96 | |
| max-branches = 16 | |
| [lint.per-file-ignores] | |
| "**/test_*.py" = ["S101", "PLR2004"] # Asserts and magic values required for tests | |
| "tests/**/*.py" = ["S101", "PLR2004"] # Asserts and magic values required for tests | |
| "backend/dataops/acquisition/download_youtube_transcript.py" = ["T201"] # CLI tool needs print() | |
| "config/settings/base.py" = ["S105", "S108"] # Demo key + temp database for containers | |
| "manage.py" = ["PLC0415"] # Django standard pattern for imports | |
| "module_setup.py" = ["S607", "S603"] # Setup script needs subprocess | |
| "scripts/run_tests.py" = ["S607", "S603"] # Test runner needs subprocess | |
| [format] | |
| line-ending = "auto" | |
| quote-style = "double" | |