diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbb4eb1..81c7923 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: ^(.secrets|docs)/ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.4 + rev: v0.9.1 hooks: - id: ruff # linter - id: ruff-format # formatter diff --git a/requirements_dev.txt b/requirements_dev.txt index 55bb5fc..f47afd7 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -10,7 +10,7 @@ # used for development (linting) pre-commit >= 4.0.1 - ruff >= 0.8.4 # also: pre-commit-config.yaml + ruff >= 0.9.1 # also: pre-commit-config.yaml # used for development (typing) mypy >= 1.13.0 diff --git a/src/evohomeasync/entities.py b/src/evohomeasync/entities.py index e82b90d..704c597 100644 --- a/src/evohomeasync/entities.py +++ b/src/evohomeasync/entities.py @@ -206,7 +206,7 @@ def name(self) -> str: @property # appears to be the zone idx (not in evohomeclientv2) def idx(self) -> str: - return f"{self._config["instance"]:02X}" + return f"{self._config['instance']:02X}" @property def max_heat_setpoint(self) -> float: diff --git a/src/evohomeasync/main.py b/src/evohomeasync/main.py index 7a12ff4..a050ab3 100644 --- a/src/evohomeasync/main.py +++ b/src/evohomeasync/main.py @@ -124,7 +124,7 @@ async def _get_config(self) -> list[EvoTcsInfoDictT]: assert self._user_info is not None # mypy (internal hint) if self._user_locs is None: - url = f"locations?userId={self._user_info["user_id"]}&allData=True" + url = f"locations?userId={self._user_info['user_id']}&allData=True" self._user_locs = await self.auth.get(url, schema=SCH_GET_ACCOUNT_LOCS) # type: ignore[assignment] assert self._user_locs is not None # mypy (internal hint) diff --git a/src/evohomeasync2/control_system.py b/src/evohomeasync2/control_system.py index 1dab209..ccd327e 100644 --- a/src/evohomeasync2/control_system.py +++ b/src/evohomeasync2/control_system.py @@ -319,7 +319,7 @@ async def restore_by_id(sched: EvoScheduleDhwT | EvoScheduleZoneT) -> bool: else: self._logger.warning( - f"Ignoring schedule of {id_} ({sched.get("name")}): unknown id" + f"Ignoring schedule of {id_} ({sched.get('name')}): unknown id" ", consider matching by name rather than by id" ) return False diff --git a/tests/tests/conftest.py b/tests/tests/conftest.py index 9fbf309..5dac173 100644 --- a/tests/tests/conftest.py +++ b/tests/tests/conftest.py @@ -149,7 +149,7 @@ def location_status_fixture(folder: Path, loc_id: str) -> JsonObjectType: def zone_schedule_fixture(folder: Path, zon_type: str) -> JsonObjectType: """Load the JSON of the schedule of a dhw/zone.""" return _load_fixture( - folder, f"schedule_{"dhw" if zon_type == "domesticHotWater" else "zone"}.json" + folder, f"schedule_{'dhw' if zon_type == 'domesticHotWater' else 'zone'}.json" ) # type: ignore[return-value] diff --git a/tests/tests_rf/test_v2_urls_auth.py b/tests/tests_rf/test_v2_urls_auth.py index 1b29d0a..d6d7e9a 100644 --- a/tests/tests_rf/test_v2_urls_auth.py +++ b/tests/tests_rf/test_v2_urls_auth.py @@ -78,7 +78,7 @@ async def _test_user_locations(evo: EvohomeClientv2) -> None: ) # type: ignore[assignment] # - url = f"location/installationInfo?userId={user_info["userId"]}" + url = f"location/installationInfo?userId={user_info['userId']}" _ = await should_work_v2( evo.auth, HTTPMethod.GET,