# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml target-version = "py310" select = ["ALL"] # All the ones without a comment were the ones that are currently violated # by the codebase. The plan is to fix them all (when sensible) and then enable them. ignore = [ "ANN", "ANN101", # Missing type annotation for {name} in method "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name} "D401", # First line of docstring should be in imperative mood "E501", # line too long "FBT001", # Boolean positional arg in function definition "FBT002", # Boolean default value in function definition "FIX004", # Line contains HACK, consider resolving the issue "PD901", # df is a bad variable name. Be kinder to your future self. "PERF203", # `try`-`except` within a loop incurs performance overhead "PLR0913", # Too many arguments to function call (N > 5) "PLR2004", # Magic value used in comparison, consider replacing X with a constant variable "S101", # Use of assert detected "SLF001", # Private member accessed ] [per-file-ignores] "tests/*.py" = ["ALL"] ".github/*py" = ["INP001"] "webapp/homeassistant_util_color.py" = ["ALL"] "webapp/app.py" = ["INP001", "DTZ011", "A002"] "custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"] [flake8-pytest-style] fixture-parentheses = false [pyupgrade] keep-runtime-typing = true [mccabe] max-complexity = 25