|
| 1 | +# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml |
| 2 | + |
| 3 | +target-version = "py314" |
| 4 | + |
| 5 | +[lint] |
| 6 | +select = [ |
| 7 | + "ALL", |
| 8 | +] |
| 9 | + |
| 10 | +ignore = [ |
| 11 | + "ANN", # Type annotations are added where they clarify integration contracts |
| 12 | + "ARG001", # Home Assistant setup signatures include framework arguments |
| 13 | + "ARG002", # Home Assistant entity methods include framework kwargs |
| 14 | + "C901", # Coordinator polling methods are intentionally grouped by endpoint |
| 15 | + "ANN401", # Dynamically typed expressions (typing.Any) are disallowed |
| 16 | + "D101", # Missing docstring in public class |
| 17 | + "D102", # Missing docstring in public method |
| 18 | + "D203", # no-blank-line-before-class (incompatible with formatter) |
| 19 | + "D205", # Missing blank line after summary |
| 20 | + "D212", # multi-line-summary-first-line (incompatible with formatter) |
| 21 | + "D107", # Missing docstring in __init__ |
| 22 | + "DTZ011", # date.today() is sufficient for API date ranges |
| 23 | + "E501", # Let formatter manage practical line length |
| 24 | + "EM102", # Home Assistant errors often use inline messages |
| 25 | + "FBT001", # Boolean arguments are acceptable in internal helpers |
| 26 | + "FBT003", # Boolean calls are acceptable for Home Assistant service-style APIs |
| 27 | + "PERF401", # Explicit entity list assembly is easier to scan |
| 28 | + "PLR0912", # Integration coordinators naturally branch by endpoint state |
| 29 | + "PLR0913", # Entity constructors mirror Home Assistant setup data |
| 30 | + "PLR0915", # Coordinator polling methods are intentionally grouped |
| 31 | + "PLR2004", # Protocol/status constants are close to their use |
| 32 | + "RUF001", # Existing user-facing strings may contain punctuation |
| 33 | + "RUF012", # Entity description class attributes are intentionally shared |
| 34 | + "TRY003", # Home Assistant errors often use direct messages |
| 35 | + "TRY300", # Existing try/except shape keeps auth/update failures local |
| 36 | + "COM812", # incompatible with formatter |
| 37 | + "ISC001", # incompatible with formatter |
| 38 | +] |
| 39 | + |
| 40 | +[lint.flake8-pytest-style] |
| 41 | +fixture-parentheses = false |
| 42 | + |
| 43 | +[lint.pyupgrade] |
| 44 | +keep-runtime-typing = true |
| 45 | + |
| 46 | +[lint.mccabe] |
| 47 | +max-complexity = 25 |
0 commit comments