Repository navigation
Fix the examples check with pylint 4.1 - #315
Merged
Merged
Conversation
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 <luca-frequenz@llucax.com>
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 <luca-frequenz@llucax.com>
llucax
requested review from
ela-kotulska-frequenz
and removed request for
a team
October 22, 2026 10:34
llucax
enabled auto-merge
October 22, 2026 10:34
Marenz
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
pytest_minsession has been failing onv1.x.xsince pylint 4.1 was released (Sep 29), which blocks every PR in the merge queue (for example #314, and #307 to #309 before it). The examples check reportsnot-an-iterable(E1133) for theActorDispatcherdocstring example.Only
pytest_minbroke because it installs justdev-pytest, where pylint comes in unpinned throughfrequenz-repo-config[extra-lint-examples], while the other sessions installdevand get the pinned pylint 4.0.8.This fixes the example itself, so it also passes with pylint 4.1, and pins pylint in
dev-pytestlike the repo-config template does, so every session uses the same version.