From 14667b6ff1a7b9c02b19121a14c50da7961eee36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 11:01:30 +0000 Subject: [PATCH 1/5] Bump the minor group across 1 directory with 7 updates Bumps the minor group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [flake8](https://github.com/pycqa/flake8) | `7.3.0` | `7.4.1` | | [markdown](https://github.com/Python-Markdown/markdown) | `3.10.3` | `3.11` | | [mypy](https://github.com/python/mypy) | `2.3.1` | `2.4.0` | | [pylint](https://github.com/pylint-dev/pylint) | `4.0.9` | `4.1.1` | | [pytest-mock](https://github.com/pytest-dev/pytest-mock) | `3.15.1` | `3.16.0` | | [hypothesis](https://github.com/HypothesisWorks/hypothesis) | `6.165.10` | `6.168.3` | | [setuptools-scm](https://github.com/pypa/setuptools-scm) | `10.2.1` | `10.3.4` | Updates `flake8` from 7.3.0 to 7.4.1 - [Commits](https://github.com/pycqa/flake8/compare/7.3.0...7.4.1) Updates `markdown` from 3.10.3 to 3.11 - [Release notes](https://github.com/Python-Markdown/markdown/releases) - [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md) - [Commits](https://github.com/Python-Markdown/markdown/compare/3.10.3...3.11.0) Updates `mypy` from 2.3.1 to 2.4.0 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v2.3.1...v2.4.0) Updates `pylint` from 4.0.9 to 4.1.1 - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.9...v4.1.1) Updates `pytest-mock` from 3.15.1 to 3.16.0 - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.15.1...v3.16.0) Updates `hypothesis` from 6.165.10 to 6.168.3 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/v6.165.10...v6.168.3) Updates `setuptools-scm` from 10.2.1 to 10.3.4 - [Release notes](https://github.com/pypa/setuptools-scm/releases) - [Changelog](https://github.com/pypa/setuptools-scm/blob/main/RELEASE_SYSTEM.md) - [Commits](https://github.com/pypa/setuptools-scm/compare/setuptools-scm-v10.2.1...setuptools-scm-v10.3.4) --- updated-dependencies: - dependency-name: flake8 dependency-version: 7.4.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: markdown dependency-version: '3.11' dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: mypy dependency-version: 2.4.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: pylint dependency-version: 4.1.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: pytest-mock dependency-version: 3.16.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: hypothesis dependency-version: 6.168.3 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: setuptools-scm dependency-version: 10.3.4 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9168f2248..0bbec842c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [build-system] requires = [ "setuptools == 84.0.0", - "setuptools_scm[toml] == 10.2.1", + "setuptools_scm[toml] == 10.3.4", "frequenz-repo-config[lib] == 0.19.0", ] build-backend = "setuptools.build_meta" @@ -48,7 +48,7 @@ email = "floss@frequenz.com" [project.optional-dependencies] dev-flake8 = [ - "flake8 == 7.3.0", + "flake8 == 7.4.1", "flake8-datetimez == 26.8.1", "flake8-docstrings == 1.7.0", "flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml @@ -58,7 +58,7 @@ dev-flake8 = [ dev-formatting = ["black == 26.5.1", "isort == 9.0.1"] dev-mkdocs = [ "black == 26.5.1", - "Markdown==3.10.3", + "Markdown==3.11", "mike == 2.2.0", "mkdocs-gen-files == 0.6.1", "mkdocs-literate-nav == 0.6.3", @@ -69,7 +69,7 @@ dev-mkdocs = [ "frequenz-repo-config[lib] == 0.19.0", ] dev-mypy = [ - "mypy == 2.3.1", + "mypy == 2.4.0", "types-Markdown == 3.10.2.20260712", "types-protobuf == 7.35.1.20260827", "types-setuptools == 84.0.0.20260812", @@ -84,13 +84,13 @@ dev-pylint = [ ] dev-pytest = [ "pytest == 9.1.1", - "pylint == 4.0.9", # We need this to check for the examples + "pylint == 4.1.1", # We need this to check for the examples "frequenz-repo-config[extra-lint-examples] == 0.19.0", - "pytest-mock == 3.15.1", + "pytest-mock == 3.16.0", "pytest-asyncio == 1.4.0", "time-machine == 2.16.0", "async-solipsism == 0.9", - "hypothesis == 6.165.10", + "hypothesis == 6.168.3", ] dev = [ "frequenz-sdk[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]", From 89f2bd043bb0fcadbef332c6e3767e65566efbd9 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 5 Oct 2026 13:29:55 +0000 Subject: [PATCH 2/5] Disable abstract-method in the progressive Actor example The first `EchoActor` example in the actor module guide only shows the initializer; `_run()` is added in the next example. Since pylint 4.1, a subclass of an abstract class is only exempt from `abstract-method` if it opts in explicitly (pylint-dev/pylint#7950), so linting this example now fails. Disable the check in the example itself. Hiding the comment from the rendered docs with pymdownx-superfence-filter-lines is not an option for now, because the example linter silently skips code blocks with extra options in the fence info line. Signed-off-by: Leandro Lucarella --- src/frequenz/sdk/actor/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frequenz/sdk/actor/__init__.py b/src/frequenz/sdk/actor/__init__.py index 19615aa04..94ee85a84 100644 --- a/src/frequenz/sdk/actor/__init__.py +++ b/src/frequenz/sdk/actor/__init__.py @@ -182,6 +182,7 @@ class we are implementing to make sure actors are properly initialized. ???+ example "Example echo actor" ```python + # pylint: disable=abstract-method from frequenz.channels import Receiver, Sender from frequenz.sdk.actor import Actor From 558743f818e377deb454c5f80ce95792f8ca3086 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 5 Oct 2026 13:30:03 +0000 Subject: [PATCH 3/5] Declare BaseTestActor explicitly abstract `BaseTestActor` is a base for the test actors and does not implement `_run()` on purpose. Since pylint 4.1, a subclass of an abstract class is only considered abstract if it opts in explicitly, so it now reports `abstract-method` for it. Inherit from `abc.ABC` to make the intention explicit. Signed-off-by: Leandro Lucarella --- tests/actor/test_actor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/actor/test_actor.py b/tests/actor/test_actor.py index 3025ff24d..05b3ff892 100644 --- a/tests/actor/test_actor.py +++ b/tests/actor/test_actor.py @@ -3,6 +3,7 @@ """Simple test for the BaseActor.""" +import abc import asyncio from datetime import timedelta @@ -18,7 +19,7 @@ class MyBaseException(BaseException): """A base exception for testing purposes.""" -class BaseTestActor(Actor): +class BaseTestActor(Actor, abc.ABC): """A base actor for testing purposes.""" restart_count: int = -1 From 70972b2af1d771129c55bd72e509b3f27a0d0dc5 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 5 Oct 2026 13:30:11 +0000 Subject: [PATCH 4/5] Silence abstract-method for EVChargerManager `ComponentManager._unreachable_power_formula()` is an optional hook that only managers subscribing to unreachable power need to override. Its default implementation raises `NotImplementedError`, so pylint considers it abstract, and since pylint 4.1 it reports `abstract-method` for `EVChargerManager`, which doesn't subscribe to unreachable power. This is a false positive, so disable the check for the class, with a comment explaining why. Signed-off-by: Leandro Lucarella --- .../_ev_charger_manager/_ev_charger_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py b/src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py index 701eed0e7..e175e22d9 100644 --- a/src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py +++ b/src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py @@ -38,7 +38,10 @@ _logger = logging.getLogger(__name__) -class EVChargerManager(ComponentManager): +# `_unreachable_power_formula()` is an optional hook, only needed by managers that +# subscribe to unreachable power, which this one doesn't. Pylint considers it abstract +# because its default implementation raises `NotImplementedError`. +class EVChargerManager(ComponentManager): # pylint: disable=abstract-method """Manage ev chargers for the power distributor.""" @override From 56bb45927ef63b15a80f323e7608e7a52a5e60eb Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 5 Oct 2026 13:30:21 +0000 Subject: [PATCH 5/5] Initialize BatteryPoolReferenceStore before starting its task `__init__()` created the `_update_battery_status()` task before assigning `_active_methods`, which the task reads. This is not a bug, as the task can't run until `__init__()` returns, but pylint 4.1 now follows methods called from `__init__()` and reports `access-member-before-definition`. Assign all attributes before creating the task, so the object is fully initialized when the task is created. Signed-off-by: Leandro Lucarella --- .../battery_pool/_battery_pool_reference_store.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py b/src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py index 76c024f51..4ef6ab074 100644 --- a/src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py +++ b/src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py @@ -93,15 +93,15 @@ def __init__( # pylint: disable=too-many-arguments self._batteries = self.component_ids self._working_batteries: set[ComponentId] = set() + self._min_update_interval: timedelta = min_update_interval + self._active_methods: dict[str, MetricAggregator[Any]] = {} + self._power_distributing_namespace: str = f"power-distributor-{self.namespace}" self._update_battery_status_task: asyncio.Task[None] | None = None if self._batteries: self._update_battery_status_task = asyncio.create_task( self._update_battery_status(self.status_receiver) ) - self._min_update_interval: timedelta = min_update_interval - self._active_methods: dict[str, MetricAggregator[Any]] = {} - self._power_distributing_namespace: str = f"power-distributor-{self.namespace}" @staticmethod def get_component_class() -> Type[Component]: