mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
58 lines
2.6 KiB
TOML
58 lines
2.6 KiB
TOML
# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml
|
|
|
|
target-version = "py310"
|
|
[lint]
|
|
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
|
|
]
|
|
|
|
[lint.per-file-ignores]
|
|
"tests/*.py" = [
|
|
"ARG001", # Unused function argument: `call`
|
|
"D100", # Missing docstring in public module
|
|
"D103", # Missing docstring in public function
|
|
"D205", # 1 blank line required between summary line and description
|
|
"D400", # First line should end with a period
|
|
"D415", # First line should end with a period, question mark, or
|
|
"DTZ001", # The use of `datetime.datetime()` without `tzinfo`
|
|
"ERA001", # Found commented-out code
|
|
"FBT003", # Boolean positional value in function call
|
|
"FIX002", # Line contains TODO, consider resolving the issue
|
|
"G004", # Logging statement uses f-string
|
|
"PLR0915", # Too many statements (94 > 50)
|
|
"PT004", # Fixture `cleanup` does not return anything, add leading underscore
|
|
"PT007", # Wrong values type in `@pytest.mark.parametrize` expected `list` of
|
|
"S311", # Standard pseudo-random generators are not suitable for cryptographic
|
|
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO
|
|
"TD003", # Missing issue link on the line following this TODO
|
|
]
|
|
".github/*py" = ["INP001"]
|
|
"webapp/homeassistant_util_color.py" = ["ALL"]
|
|
"webapp/app.py" = ["INP001", "DTZ011", "A002"]
|
|
"custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"]
|
|
|
|
[lint.flake8-pytest-style]
|
|
fixture-parentheses = false
|
|
|
|
[lint.pyupgrade]
|
|
keep-runtime-typing = true
|
|
|
|
[lint.mccabe]
|
|
max-complexity = 25
|