From 6e4d64897c3fda690f541e04afcf56fa8e75717f Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 22 Oct 2026 10:19:13 +0000 Subject: [PATCH 1/2] Use a real receiver in the `ActorDispatcher` example The example used `...` as a placeholder value for `other_recv` and then iterated over it with `async for`. pylint ignores the annotation and infers the value as `Ellipsis`, which is not iterable. pylint 4.0.8 did not catch this, but pylint 4.1 (with astroid 4.3) reports it as `not-an-iterable` (E1133), making the examples check fail. Create the receiver from a `Broadcast` channel instead, which is already imported in the example and shows how such a receiver would be created in practice. Disabling the check would also work, but it would leave a pylint suppression in user-facing documentation to hide an example that is really wrong. Signed-off-by: Leandro Lucarella --- src/frequenz/dispatch/_actor_dispatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frequenz/dispatch/_actor_dispatcher.py b/src/frequenz/dispatch/_actor_dispatcher.py index 9c31b52..a8a8bc5 100644 --- a/src/frequenz/dispatch/_actor_dispatcher.py +++ b/src/frequenz/dispatch/_actor_dispatcher.py @@ -142,7 +142,7 @@ def new_with_dispatch( @override async def _run(self) -> None: - other_recv: Receiver[Any] = ... + other_recv: Receiver[Any] = Broadcast[Any](name="other").new_receiver() if self._dispatch_updates_receiver is None: async for msg in other_recv: From 8b47c41f4fc2965ff37aa6ecf5e81081dafe867a Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 22 Oct 2026 10:19:21 +0000 Subject: [PATCH 2/2] Pin pylint in the `dev-pytest` dependencies The examples check runs pylint, but `dev-pytest` only gets it indirectly through `frequenz-repo-config[extra-lint-examples]`, which accepts any `pylint >= 2.17.3, < 5`. The `pytest_min` nox session only installs `dev-pytest`, so it always gets the latest pylint, while the other sessions install `dev` and get the version pinned in `dev-pylint`. This is how pylint 4.1 broke `pytest_min` while all other checks kept passing. Pin it to the same version as `dev-pylint`, as the repo-config template does, so every session uses the same pylint and new releases only come in through Dependabot. Signed-off-by: Leandro Lucarella --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 0ba71df..410b1cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,6 +94,7 @@ dev-pylint = [ ] dev-pytest = [ "pytest == 9.1.1", + "pylint == 4.0.8", # We need this to check for the examples "frequenz-repo-config[extra-lint-examples] == 0.19.0", "pytest-mock == 3.15.1", "pytest-asyncio == 1.4.0",