From fcfb580f0c4f7da1a88da7bd86b07006c1a8590f Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:29:55 +0200 Subject: [PATCH] Update pylint to 3.2.4 (#120606) --- homeassistant/components/solarlog/config_flow.py | 2 +- requirements_test.txt | 2 +- tests/common.py | 2 +- tests/components/influxdb/test_init.py | 1 - tests/components/owntracks/test_device_tracker.py | 2 -- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/solarlog/config_flow.py b/homeassistant/components/solarlog/config_flow.py index eb0971e0d92..7c8401be2b8 100644 --- a/homeassistant/components/solarlog/config_flow.py +++ b/homeassistant/components/solarlog/config_flow.py @@ -58,7 +58,7 @@ class SolarLogConfigFlow(ConfigFlow, domain=DOMAIN): except SolarLogConnectionError: self._errors = {CONF_HOST: "cannot_connect"} return False - except SolarLogError: # pylint: disable=broad-except + except SolarLogError: self._errors = {CONF_HOST: "unknown"} return False finally: diff --git a/requirements_test.txt b/requirements_test.txt index 460da410db6..e2818b559ea 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -14,7 +14,7 @@ mock-open==1.4.0 mypy-dev==1.11.0a9 pre-commit==3.7.1 pydantic==1.10.17 -pylint==3.2.2 +pylint==3.2.4 pylint-per-file-ignores==1.3.2 pipdeptree==2.19.0 pytest-asyncio==0.23.6 diff --git a/tests/common.py b/tests/common.py index f5531dbf40d..52ea4861c81 100644 --- a/tests/common.py +++ b/tests/common.py @@ -379,7 +379,7 @@ def async_mock_service( calls = [] @callback - def mock_service_log(call): # pylint: disable=unnecessary-lambda + def mock_service_log(call): """Mock service call.""" calls.append(call) if raise_exception is not None: diff --git a/tests/components/influxdb/test_init.py b/tests/components/influxdb/test_init.py index aba153cf8a8..2d93322999d 100644 --- a/tests/components/influxdb/test_init.py +++ b/tests/components/influxdb/test_init.py @@ -79,7 +79,6 @@ def get_mock_call_fixture(request: pytest.FixtureRequest): if request.param == influxdb.API_VERSION_2: return lambda body, precision=None: v2_call(body, precision) - # pylint: disable-next=unnecessary-lambda return lambda body, precision=None: call(body, time_precision=precision) diff --git a/tests/components/owntracks/test_device_tracker.py b/tests/components/owntracks/test_device_tracker.py index 8246a7f51ac..0648a94c70b 100644 --- a/tests/components/owntracks/test_device_tracker.py +++ b/tests/components/owntracks/test_device_tracker.py @@ -285,8 +285,6 @@ BAD_MESSAGE = {"_type": "unsupported", "tst": 1} BAD_JSON_PREFIX = "--$this is bad json#--" BAD_JSON_SUFFIX = "** and it ends here ^^" -# pylint: disable=len-as-condition - @pytest.fixture def setup_comp(