diff --git a/homeassistant/components/recorder/statistics.py b/homeassistant/components/recorder/statistics.py index 4cc6e40fa69..48bab4b11fd 100644 --- a/homeassistant/components/recorder/statistics.py +++ b/homeassistant/components/recorder/statistics.py @@ -1940,10 +1940,7 @@ def _latest_short_term_statistics_stmt( .group_by(StatisticsShortTerm.metadata_id) ).subquery() ), - ( - StatisticsShortTerm.metadata_id # pylint: disable=comparison-with-callable - == most_recent_statistic_row.c.metadata_id - ) + (StatisticsShortTerm.metadata_id == most_recent_statistic_row.c.metadata_id) & (StatisticsShortTerm.start_ts == most_recent_statistic_row.c.start_max), ) return stmt diff --git a/homeassistant/components/reolink/__init__.py b/homeassistant/components/reolink/__init__.py index c3d8df61f5a..76c0963e2c0 100644 --- a/homeassistant/components/reolink/__init__.py +++ b/homeassistant/components/reolink/__init__.py @@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b raise ConfigEntryNotReady( f"Error while trying to setup {host.api.host}:{host.api.port}: {str(err)}" ) from err - except Exception: # pylint: disable=broad-except + except Exception: await host.stop() raise diff --git a/homeassistant/components/thread/diagnostics.py b/homeassistant/components/thread/diagnostics.py index eb1e2a5ef68..8dc5dd43041 100644 --- a/homeassistant/components/thread/diagnostics.py +++ b/homeassistant/components/thread/diagnostics.py @@ -29,7 +29,7 @@ from .dataset_store import async_get_store from .discovery import async_read_zeroconf_cache if TYPE_CHECKING: - from pyroute2 import NDB # pylint: disable=no-name-in-module + from pyroute2 import NDB class Neighbour(TypedDict): @@ -121,7 +121,7 @@ def _get_routes_and_neighbors(): NDB, ) - with NDB() as ndb: # pylint: disable=not-callable + with NDB() as ndb: routes, reverse_routes = _get_possible_thread_routes(ndb) neighbours = _get_neighbours(ndb) diff --git a/homeassistant/runner.py b/homeassistant/runner.py index 8c5766cbb2b..0926fb67459 100644 --- a/homeassistant/runner.py +++ b/homeassistant/runner.py @@ -62,7 +62,7 @@ def can_use_pidfd() -> bool: return False try: pid = os.getpid() - os.close(os.pidfd_open(pid, 0)) # pylint: disable=no-member + os.close(os.pidfd_open(pid, 0)) except OSError: # blocked by security policy like SECCOMP return False diff --git a/requirements_test.txt b/requirements_test.txt index 9e6ded1f395..f5be4d07597 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -7,7 +7,7 @@ -c homeassistant/package_constraints.txt -r requirements_test_pre_commit.txt -astroid==2.14.2 +astroid==2.15.0 codecov==2.1.12 coverage==7.2.1 freezegun==1.2.2 @@ -15,7 +15,7 @@ mock-open==1.4.0 mypy==1.0.1 pre-commit==3.1.0 pydantic==1.10.5 -pylint==2.16.4 +pylint==2.17.0 pylint-per-file-ignores==1.1.0 pipdeptree==2.5.0 pytest-asyncio==0.20.3