From 8f33ad38cf443fedeef7f32b48f179c60415f583 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 21 Nov 2022 08:58:45 +0100 Subject: [PATCH] Update pylint to 2.15.6 (#82440) * Update pylint to 2.15.6 * Use single pylint disable * Use implicit dict constructor --- .../components/esphome/bluetooth/client.py | 10 ++++++---- homeassistant/components/kef/media_player.py | 16 ++++++++-------- requirements_test.txt | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/esphome/bluetooth/client.py b/homeassistant/components/esphome/bluetooth/client.py index ceac4e5aaae..6672b17d8ba 100644 --- a/homeassistant/components/esphome/bluetooth/client.py +++ b/homeassistant/components/esphome/bluetooth/client.py @@ -92,15 +92,17 @@ def api_error_as_bleak_error(func: _WrapFuncType) -> _WrapFuncType: # Because callbacks are delivered asynchronously it's possible # that we find out about the disconnection during the operation # before the callback is delivered. + + # pylint: disable=protected-access if ex.error.error == -1: _LOGGER.debug( "%s: %s - %s: BLE device disconnected during %s operation", - self._source, # pylint: disable=protected-access - self._ble_device.name, # pylint: disable=protected-access - self._ble_device.address, # pylint: disable=protected-access + self._source, + self._ble_device.name, + self._ble_device.address, func.__name__, ) - self._async_ble_device_disconnected() # pylint: disable=protected-access + self._async_ble_device_disconnected() raise BleakError(str(ex)) from ex except APIConnectionError as err: raise BleakError(str(err)) from err diff --git a/homeassistant/components/kef/media_player.py b/homeassistant/components/kef/media_player.py index 078354c705e..96f52ef7e03 100644 --- a/homeassistant/components/kef/media_player.py +++ b/homeassistant/components/kef/media_player.py @@ -321,15 +321,15 @@ class KefMediaPlayer(MediaPlayerEntity): return mode = await self._speaker.get_mode() - self._dsp = dict( - desk_db=await self._speaker.get_desk_db(), - wall_db=await self._speaker.get_wall_db(), - treble_db=await self._speaker.get_treble_db(), - high_hz=await self._speaker.get_high_hz(), - low_hz=await self._speaker.get_low_hz(), - sub_db=await self._speaker.get_sub_db(), + self._dsp = { + "desk_db": await self._speaker.get_desk_db(), + "wall_db": await self._speaker.get_wall_db(), + "treble_db": await self._speaker.get_treble_db(), + "high_hz": await self._speaker.get_high_hz(), + "low_hz": await self._speaker.get_low_hz(), + "sub_db": await self._speaker.get_sub_db(), **mode._asdict(), - ) + } async def async_added_to_hass(self) -> None: """Subscribe to DSP updates.""" diff --git a/requirements_test.txt b/requirements_test.txt index 6aa8ed48236..b4bfaa3038d 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -7,14 +7,14 @@ -c homeassistant/package_constraints.txt -r requirements_test_pre_commit.txt -astroid==2.12.12 +astroid==2.12.13 codecov==2.1.12 coverage==6.4.4 freezegun==1.2.2 mock-open==1.4.0 mypy==0.991 pre-commit==2.20.0 -pylint==2.15.5 +pylint==2.15.6 pipdeptree==2.3.1 pytest-aiohttp==0.3.0 pytest-cov==3.0.0