Skip to content

Commit ece9660

Browse files
committed
Fix PLR0917 errors
1 parent d86c19b commit ece9660

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

plugwise/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def __init__(
6060
password,
6161
port,
6262
self._timeout,
63-
username,
64-
websession,
63+
username=username,
64+
websession=websession,
6565
)
6666

6767
self._cooling_present = False

plugwise/smilecomm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(
3434
password: str,
3535
port: int,
3636
timeout: int,
37+
*,
3738
username: str,
3839
websession: ClientSession | None,
3940
) -> None:

tests/test_init.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ async def connect(
283283
broken=False,
284284
fail_auth=False,
285285
raise_timeout=False,
286+
*,
286287
smile_timeout_value=10,
287288
stretch=False,
288289
timeout_happened=False,
@@ -728,7 +729,7 @@ async def tinker_thermostat_preset(self, api, loc_id, unhappy=False):
728729

729730
@pytest.mark.asyncio
730731
async def tinker_thermostat_schedule(
731-
self, api, loc_id, state, good_schedules=None, single=False, unhappy=False
732+
self, api, loc_id, state, *, good_schedules=None, single=False, unhappy=False
732733
):
733734
"""Toggle schedules to test functionality."""
734735
# pragma warning disable S3776
@@ -798,6 +799,7 @@ async def tinker_thermostat(
798799
self,
799800
api,
800801
loc_id,
802+
*,
801803
schedule_on=True,
802804
good_schedules=None,
803805
single=False,
@@ -817,14 +819,29 @@ async def tinker_thermostat(
817819
for item in api._schedule_old_states[loc_id]:
818820
api._schedule_old_states[loc_id][item] = "off"
819821
result_3 = await self.tinker_thermostat_schedule(
820-
api, loc_id, "on", good_schedules, single, unhappy
822+
api,
823+
loc_id,
824+
"on",
825+
good_schedules=good_schedules,
826+
single=single,
827+
unhappy=unhappy,
821828
)
822829
if schedule_on:
823830
result_4 = await self.tinker_thermostat_schedule(
824-
api, loc_id, "off", good_schedules, single, unhappy
831+
api,
832+
loc_id,
833+
"off",
834+
good_schedules=good_schedules,
835+
single=single,
836+
unhappy=unhappy,
825837
)
826838
result_5 = await self.tinker_thermostat_schedule(
827-
api, loc_id, "on", good_schedules, single, unhappy
839+
api,
840+
loc_id,
841+
"on",
842+
good_schedules=good_schedules,
843+
single=single,
844+
unhappy=unhappy,
828845
)
829846
return result_1 and result_2 and result_3 and result_4 and result_5
830847
return result_1 and result_2 and result_3

0 commit comments

Comments
 (0)