1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-05-08 08:58:31 +01:00

Migrate to Ruff for lint and format (#4852)

* Migrate to Ruff for lint and format

* Fix pylint issues

* DBus property sets into normal awaitable methods

* Fix tests relying on separate tasks in connect

* Fixes from feedback
This commit is contained in:
Mike Degatano
2024-02-05 11:37:39 -05:00
committed by GitHub
parent 1861d756e9
commit 7fd6dce55f
122 changed files with 694 additions and 668 deletions
+2 -5
View File
@@ -13,9 +13,6 @@ def setup(object_path: str | None = None) -> DBusServiceMock:
return SystemdUnit(object_path or DEFAULT_OBJECT_PATH)
# pylint: disable=invalid-name,missing-function-docstring
class SystemdUnit(DBusServiceMock):
"""Systemd Unit mock.
@@ -196,7 +193,7 @@ class SystemdUnit(DBusServiceMock):
@dbus_property(access=PropertyAccess.READ)
def RequiresMountsFor(self) -> "as":
"""Get RequiresMountsFor."""
return ["/tmp"]
return ["/tmp"] # noqa: S108
@dbus_property(access=PropertyAccess.READ)
def Documentation(self) -> "as":
@@ -206,7 +203,7 @@ class SystemdUnit(DBusServiceMock):
@dbus_property(access=PropertyAccess.READ)
def Description(self) -> "s":
"""Get Description."""
return "/tmp/yellow"
return "/tmp/yellow" # noqa: S108
@dbus_property(access=PropertyAccess.READ)
def AccessSELinuxContext(self) -> "s":