Skip to content

Commit 9ac41f2

Browse files
authored
Merge pull request #270 from plugwise/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 6583116 + d3e8740 commit 9ac41f2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
- id: pyupgrade
2727
args: [--py39-plus]
2828
- repo: https://github.com/psf/black
29-
rev: 22.12.0
29+
rev: 23.1.0
3030
hooks:
3131
- id: black
3232
args:

plugwise/helper.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ def __init__(
225225
):
226226
"""Set the constructor for this class."""
227227
if not websession:
228-
229228
aio_timeout = ClientTimeout(total=timeout)
230229

231230
async def _create_session() -> ClientSession:
@@ -303,7 +302,9 @@ async def _request(
303302
data=data,
304303
auth=self._auth,
305304
)
306-
except ClientError as err: # ClientError is an ancestor class of ServerTimeoutError
305+
except (
306+
ClientError
307+
) as err: # ClientError is an ancestor class of ServerTimeoutError
307308
if retry < 1:
308309
LOGGER.warning(
309310
"Failed sending %s %s to Plugwise Smile, error: %s",
@@ -1014,7 +1015,6 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
10141015
if (
10151016
appliance := self._appliances.find(f'./appliance[@id="{d_id}"]')
10161017
) is not None:
1017-
10181018
self._appliance_measurements(appliance, data, measurements)
10191019
self._get_lock_state(appliance, data)
10201020

@@ -1082,7 +1082,6 @@ def _rank_thermostat(
10821082
appl_class = appliance_details["dev_class"]
10831083
appl_d_loc = appliance_details["location"]
10841084
if loc_id == appl_d_loc and appl_class in thermo_matching:
1085-
10861085
# Pre-elect new master
10871086
if thermo_matching[appl_class] > self._thermo_locs[loc_id]["master_prio"]:
10881087
# Demote former master

0 commit comments

Comments
 (0)