Update pylint to 3.0.4 (#111229)

* Update pylint to 3.0.4

* Use yield from

* Remove unnecessary pylint disable comments
This commit is contained in:
Marc Mueller 2024-02-23 23:46:00 +01:00 committed by GitHub
parent efd1ed86ae
commit 5f8ef37f2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5 additions and 9 deletions

View File

@ -523,7 +523,6 @@ class BangOlufsenMediaPlayer(MediaPlayerEntity, BangOlufsenEntity):
)
return
# pylint: disable=consider-using-dict-items
key = [x for x in self._sources if self._sources[x] == source][0]
# Check for source type

View File

@ -15,8 +15,6 @@ from typing import TYPE_CHECKING, Any, Final, Self, cast, final
from typing_extensions import override
from homeassistant.config_entries import ConfigEntry
# pylint: disable-next=hass-deprecated-import
from homeassistant.const import ( # noqa: F401
_DEPRECATED_DEVICE_CLASS_AQI,
_DEPRECATED_DEVICE_CLASS_BATTERY,

View File

@ -421,8 +421,7 @@ class PeekIterator(Iterator):
# Items consumed are added to a buffer for future calls to __next__
# or peek. First iterate over the buffer from previous calls to peek.
self._next = self._pop_buffer
for packet in self._buffer:
yield packet
yield from self._buffer
for packet in self._iterator:
self._buffer.append(packet)
yield packet

View File

@ -63,7 +63,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# Get all devices from Tuya
try:
await hass.async_add_executor_job(manager.update_device_cache)
except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
# While in general, we should avoid catching broad exceptions,
# we have no other way of detecting this case.
if "sign invalid" in str(exc):

View File

@ -158,7 +158,7 @@ async def async_setup_component(
if setup_done_future := setup_done_futures.pop(domain, None):
setup_done_future.set_result(result)
return result
except BaseException as err: # pylint: disable=broad-except
except BaseException as err:
futures = [setup_future]
if setup_done_future := setup_done_futures.pop(domain, None):
futures.append(setup_done_future)

View File

@ -7,14 +7,14 @@
-c homeassistant/package_constraints.txt
-r requirements_test_pre_commit.txt
astroid==3.0.1
astroid==3.0.3
coverage==7.4.2
freezegun==1.3.1
mock-open==1.4.0
mypy==1.8.0
pre-commit==3.6.2
pydantic==1.10.12
pylint==3.0.3
pylint==3.0.4
pylint-per-file-ignores==1.3.2
pipdeptree==2.13.2
pytest-asyncio==0.23.5