Skip to content

Commit

Permalink
bump ruff and reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Jan 12, 2025
1 parent 50ef8c3 commit 51a29a2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync2/control_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
2 changes: 1 addition & 1 deletion tests/tests_rf/test_v2_urls_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 51a29a2

Please sign in to comment.