Style with ruff and logging (#643)

* Formatting with ruff

* more logging

* Require on_only

* Different implementation

* More ruff

* Remove new logging statements

* Remove 'pylint: disable=protected'

* style

* fixes

* ruff

* Switch to ruff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix .github

* Fix

* Add ignores

* fix arg

* fix B905

* Fix D

* Fix more

* Fix more

* order

* use path

* moer path

* Remove unused ignores

* fix tes deps

* fix typo

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Bas Nijholt 2023-07-23 14:24:22 -07:00 • committed by GitHub
commit bb84684bce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 326 additions and 246 deletions

View file

@ -1,13 +1,17 @@
"""Extracts the dependencies of the components required for testing."""
from collections import defaultdict
from pathlib import Path
deps = defaultdict(list)
components, packages = [], []
with open("core/requirements_test_all.txt") as f:
requirements = Path("core") / "requirements_test_all.txt"
with requirements.open() as f:
lines = f.readlines()
for line in lines:
line = line.strip()
line = line.strip() # noqa: PLW2901
if line.startswith("# homeassistant."):
if components and packages:
@ -34,4 +38,4 @@ required = [
]
to_install = [package for r in required for package in deps[r]]
print(" ".join(to_install))
print(" ".join(to_install)) # noqa: T201