line-length = 120 [format] quote-style = "double" [lint] preview = false select = [ "B", # flake8-bugbear rules "C4", # flake8-comprehensions "E", # pycodestyle E rules "F", # pyflakes rules "FURB", # refurb rules "I", # isort rules "N", # pep8-naming "PT", # flake8-pytest-style rules "PLC0208", # iteration-over-set "PLC2801", # unnecessary-dunder-call "PLC0414", # useless-import-alias "PLR0402", # manual-from-import "PLR1711", # useless-return "PLR1714", # repeated-equality-comparison "RUF013", # implicit-optional "RUF019", # unnecessary-key-check "RUF100", # unused-noqa "RUF101", # redirected-noqa "RUF200", # invalid-pyproject-toml "S506", # unsafe-yaml-load "SIM", # flake8-simplify rules "TRY400", # error-instead-of-exception "TRY401", # verbose-log-message "UP", # pyupgrade rules "W191", # tab-indentation "W605", # invalid-escape-sequence # Security related linting rules # https://docs.astral.sh/ruff/rules/#flake8-bandit-s "S", # avoid shadowing builtins # https://docs.astral.sh/ruff/rules/#flake8-builtins-a "A", # prohibit calls to `breakpoint()` in committed code # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10 "T10", # disallow calling functions with boolean positional # arguments. # # https://docs.astral.sh/ruff/rules/boolean-positional-value-in-call/ "FBT003", # Pycodestyle's warning # https://docs.astral.sh/ruff/rules/#warning-w "W", # Ruff specific rules # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf "RUF", ] ignore = [ # ===================== Ruff-specific rules (RUF) ===================== # ambiguous-unicode-character-string, # disabled beacause of false positives # ref: https://docs.astral.sh/ruff/rules/ambiguous-unicode-character-string/ "RUF001", # ===================== flake8-bandit (S) rules ===================== "S101", # use of assert detected, https://docs.astral.sh/ruff/rules/assert/ # hardcoded-bind-all-interfaces, https://docs.astral.sh/ruff/rules/hardcoded-bind-all-interfaces/ # disabled beacause of false positives "S104", # hardcoded-password-string, https://docs.astral.sh/ruff/rules/hardcoded-password-string/ # disabled beacause of false positives "S105", "E402", # module-import-not-at-top-of-file "N815", # mixed-case-variable-in-class-scope # deprecated and not recommended # # https://docs.astral.sh/ruff/rules/non-pep604-isinstance/ "UP038", # Disable UP007 for now due to the significant number of # violations in the current codebase. # # Reference: https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/ "UP007", ] [lint.pyflakes] extend-generics = ["_pytest.monkeypatch", "tests.integration_tests"]