Skip to content

Commit 3880dad

Browse files
committed
More CRAI suggestions
1 parent d4d3144 commit 3880dad

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

airos/airos8.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ async def login(self) -> bool:
193193
_LOGGER.info("Login task was cancelled")
194194
raise
195195

196-
def derived_data(self, response: dict[str, Any]) -> dict[str, Any]:
196+
@staticmethod
197+
def derived_data(response: dict[str, Any]) -> dict[str, Any]:
197198
"""Add derived data to the device response."""
198199
derived: dict[str, Any] = {
199200
"station": False,

script/generate_ha_fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def generate_airos_fixtures() -> None:
4545
with open(base_fixture_path, encoding="utf-8") as source:
4646
source_data = json.loads(source.read())
4747

48-
derived_data = AirOS.derived_data(None, source_data) # type: ignore[arg-type]
48+
derived_data = AirOS.derived_data(source_data)
4949
new_data = AirOSData.from_dict(derived_data)
5050

5151
with open(new_fixture_path, "w", encoding="utf-8") as new:

script/mashumaro-step-debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main() -> None:
7373
_LOGGER.info(" Success! Interface is valid.")
7474

7575
_LOGGER.info("Deriving AirOS8Data from object...")
76-
derived_data = AirOS.derived_data(None, data) # type: ignore[arg-type]
76+
derived_data = AirOS.derived_data(data)
7777

7878
_LOGGER.info("Attempting to deserialize full AirOS8Data object...")
7979
airos_data_obj = AirOS8Data.from_dict(derived_data) # noqa: F841

0 commit comments

Comments
 (0)