Skip to content

Commit

Permalink
Fix ruff findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Shutgun committed Jan 13, 2025
1 parent 999f7b3 commit 31d59c2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion devolo_home_control_api/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"vfs.hdm": "_led",
}

__all__ = ["Mprm", "MESSAGE_TYPES"]
__all__ = ["MESSAGE_TYPES", "Mprm"]
5 changes: 4 additions & 1 deletion devolo_home_control_api/backend/mprm_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
from typing import Any

from requests import Session
from requests.exceptions import ConnectionError, ReadTimeout
from requests.exceptions import (
ConnectionError, # noqa: A004
ReadTimeout,
)

from devolo_home_control_api.devices import Gateway
from devolo_home_control_api.exceptions import GatewayOfflineError
Expand Down
6 changes: 3 additions & 3 deletions devolo_home_control_api/helper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Helper functions used in the package."""
from .string import camel_case_to_snake_case
from .names import camel_case_to_snake_case
from .uid import (
get_device_type_from_element_uid,
get_device_uid_from_element_uid,
Expand All @@ -10,9 +10,9 @@

__all__ = [
"camel_case_to_snake_case",
"get_device_type_from_element_uid",
"get_device_uid_from_element_uid",
"get_device_uid_from_setting_uid",
"get_sub_device_uid_from_element_uid",
"get_device_type_from_element_uid",
"get_home_id_from_device_uid",
"get_sub_device_uid_from_element_uid",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Helper functions for converting strings.
Helper functions for converting names.
The information we get from the gateway is often returned in a way, that does not fit to our naming convention. This helper
function make names fit in nicely.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ignore_missing_imports = true

[tool.ruff]
line-length = 127
lint.ignore = ["ANN101", "ANN102", "ANN401", "B024", "COM812", "D203", "D205", "D212", "EM", "FBT001", "N818", "TCH", "TRY300", "TRY400"]
lint.ignore = ["ANN401", "B024", "COM812", "D203", "D205", "D212", "EM", "FBT001", "N818", "TCH", "TRY300", "TRY400"]
lint.select = ["ALL"]
target-version = "py37"

Expand Down

0 comments on commit 31d59c2

Please sign in to comment.