mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Update pylint to 2.13.5 (#69989)
This commit is contained in:
parent
2b69dffe57
commit
e407960f68
@ -112,7 +112,6 @@ class MutexPool(StaticPool): # type: ignore[misc]
|
|||||||
|
|
||||||
if DEBUG_MUTEX_POOL:
|
if DEBUG_MUTEX_POOL:
|
||||||
_LOGGER.debug("%s wait conn%s", threading.current_thread().name, trace_msg)
|
_LOGGER.debug("%s wait conn%s", threading.current_thread().name, trace_msg)
|
||||||
# pylint: disable-next=consider-using-with
|
|
||||||
got_lock = MutexPool.pool_lock.acquire(timeout=1)
|
got_lock = MutexPool.pool_lock.acquire(timeout=1)
|
||||||
if not got_lock:
|
if not got_lock:
|
||||||
raise SQLAlchemyError
|
raise SQLAlchemyError
|
||||||
|
@ -258,9 +258,7 @@ class SamsungTVDevice(MediaPlayerEntity):
|
|||||||
except asyncio.TimeoutError as err:
|
except asyncio.TimeoutError as err:
|
||||||
# No need to try again
|
# No need to try again
|
||||||
self._app_list_event.set()
|
self._app_list_event.set()
|
||||||
LOGGER.debug(
|
LOGGER.debug("Failed to load app list from %s: %r", self._host, err)
|
||||||
"Failed to load app list from %s: %s", self._host, err.__repr__()
|
|
||||||
)
|
|
||||||
|
|
||||||
async def _async_startup_dmr(self) -> None:
|
async def _async_startup_dmr(self) -> None:
|
||||||
assert self._ssdp_rendering_control_location is not None
|
assert self._ssdp_rendering_control_location is not None
|
||||||
@ -378,9 +376,7 @@ class SamsungTVDevice(MediaPlayerEntity):
|
|||||||
try:
|
try:
|
||||||
await dmr_device.async_set_volume_level(volume)
|
await dmr_device.async_set_volume_level(volume)
|
||||||
except UpnpActionResponseError as err:
|
except UpnpActionResponseError as err:
|
||||||
LOGGER.warning(
|
LOGGER.warning("Unable to set volume level on %s: %r", self._host, err)
|
||||||
"Unable to set volume level on %s: %s", self._host, err.__repr__()
|
|
||||||
)
|
|
||||||
|
|
||||||
async def async_volume_up(self) -> None:
|
async def async_volume_up(self) -> None:
|
||||||
"""Volume up the media player."""
|
"""Volume up the media player."""
|
||||||
|
@ -121,11 +121,13 @@ def setup_platform(
|
|||||||
]
|
]
|
||||||
|
|
||||||
master = next(
|
master = next(
|
||||||
|
iter(
|
||||||
[
|
[
|
||||||
device
|
device
|
||||||
for device in hass.data[DATA_SOUNDTOUCH]
|
for device in hass.data[DATA_SOUNDTOUCH]
|
||||||
if device.entity_id == master_device_id
|
if device.entity_id == master_device_id
|
||||||
].__iter__(),
|
]
|
||||||
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -357,9 +359,9 @@ class SoundTouchDevice(MediaPlayerEntity):
|
|||||||
# Preset
|
# Preset
|
||||||
presets = self._device.presets()
|
presets = self._device.presets()
|
||||||
preset = next(
|
preset = next(
|
||||||
[
|
iter(
|
||||||
preset for preset in presets if preset.preset_id == str(media_id)
|
[preset for preset in presets if preset.preset_id == str(media_id)]
|
||||||
].__iter__(),
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
if preset is not None:
|
if preset is not None:
|
||||||
|
@ -23,7 +23,6 @@ TO_REDACT = {
|
|||||||
"name",
|
"name",
|
||||||
"node_key",
|
"node_key",
|
||||||
"user",
|
"user",
|
||||||
"user",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ def entity_selector_without_own_entities(
|
|||||||
entity_registry = er.async_get(handler.hass)
|
entity_registry = er.async_get(handler.hass)
|
||||||
entities = er.async_entries_for_config_entry(
|
entities = er.async_entries_for_config_entry(
|
||||||
entity_registry,
|
entity_registry,
|
||||||
handler.config_entry.entry_id, # pylint: disable=protected-access
|
handler.config_entry.entry_id,
|
||||||
)
|
)
|
||||||
entity_ids = [ent.entity_id for ent in entities]
|
entity_ids = [ent.entity_id for ent in entities]
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ class TemplateState(State):
|
|||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""Representation of Template State."""
|
"""Representation of Template State."""
|
||||||
return f"<template TemplateState({self._state.__repr__()})>"
|
return f"<template TemplateState({self._state!r})>"
|
||||||
|
|
||||||
|
|
||||||
def _collect_state(hass: HomeAssistant, entity_id: str) -> None:
|
def _collect_state(hass: HomeAssistant, entity_id: str) -> None:
|
||||||
|
@ -13,7 +13,7 @@ freezegun==1.2.1
|
|||||||
mock-open==1.4.0
|
mock-open==1.4.0
|
||||||
mypy==0.942
|
mypy==0.942
|
||||||
pre-commit==2.17.0
|
pre-commit==2.17.0
|
||||||
pylint==2.13.3
|
pylint==2.13.5
|
||||||
pipdeptree==2.2.1
|
pipdeptree==2.2.1
|
||||||
pylint-strict-informational==0.1
|
pylint-strict-informational==0.1
|
||||||
pytest-aiohttp==0.3.0
|
pytest-aiohttp==0.3.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user