mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
* build: dev container
Add a VS Code Dev Container from the blueprint at bceaae212f
* build: dev container test setup
Add support for unit testing in the dev container environment with debugging and code coverage.
* ci: adjust to dev container test restructuring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ci: fix coverage collection
* build: add dummy light to HA config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* build: update dev container to Python 3.11 (for HA 2023.6)
* Add VS Code tasks
* Use pre-commit hooks for linting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Unpin HA version
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
48 lines
1.9 KiB
TOML
48 lines
1.9 KiB
TOML
# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml
|
|
|
|
target-version = "py310"
|
|
|
|
select = [
|
|
"B007", # Loop control variable {name} not used within loop body
|
|
"B014", # Exception handler with duplicate exception
|
|
"C", # complexity
|
|
"D", # docstrings
|
|
"E", # pycodestyle
|
|
"F", # pyflakes/autoflake
|
|
"ICN001", # import concentions; {name} should be imported as {asname}
|
|
"PGH004", # Use specific rule codes when using noqa
|
|
"PLC0414", # Useless import alias. Import alias does not rename original package.
|
|
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
|
|
"SIM117", # Merge with-statements that use the same scope
|
|
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
|
|
"SIM201", # Use {left} != {right} instead of not {left} == {right}
|
|
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
|
|
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
|
|
"SIM401", # Use get from dict with default instead of an if block
|
|
"T20", # flake8-print
|
|
"TRY004", # Prefer TypeError exception for invalid type
|
|
"RUF006", # Store a reference to the return value of asyncio.create_task
|
|
"UP", # pyupgrade
|
|
"W", # pycodestyle
|
|
]
|
|
|
|
ignore = [
|
|
"D202", # No blank lines allowed after function docstring
|
|
"D203", # 1 blank line required before class docstring
|
|
"D213", # Multi-line docstring summary should start at the second line
|
|
"D404", # First word of the docstring should not be This
|
|
"D406", # Section name should end with a newline
|
|
"D407", # Section name underlining
|
|
"D411", # Missing blank line before section
|
|
"E501", # line too long
|
|
"E731", # do not assign a lambda expression, use a def
|
|
]
|
|
|
|
[flake8-pytest-style]
|
|
fixture-parentheses = false
|
|
|
|
[pyupgrade]
|
|
keep-runtime-typing = true
|
|
|
|
[mccabe]
|
|
max-complexity = 25
|