Skip to content

fix pylint errors on all() and filter()#899

Merged
bckohan merged 3 commits into
django-commons:mainfrom
bckohan:pylintfix
May 29, 2026
Merged

fix pylint errors on all() and filter()#899
bckohan merged 3 commits into
django-commons:mainfrom
bckohan:pylintfix

Conversation

@bckohan
Copy link
Copy Markdown
Member

@bckohan bckohan commented May 29, 2026

closes #898

pylint is reading the ... in the type hint stubs in the TYPE_CHECKING block and incorrectly inferring no-return type. This fixes the check by inserting dummy returns. There is no runtime change.

Copilot AI review requested due to automatic review settings May 29, 2026 05:55
@bckohan bckohan changed the title fix #898 fix pylint errors on all() and filter() May 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses pylint false positives from type-only method stubs in PolymorphicManager by replacing ellipsis bodies with dummy return implementations, with no runtime behavior change.

Changes:

  • Adds return bodies for TYPE_CHECKING-only all() and filter() manager stubs.
  • Bumps package version from 4.11.3 to 4.11.4.
  • Adds a changelog entry for issue #898.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
src/polymorphic/managers.py Updates type-checking-only method stubs to avoid pylint no-return inference.
src/polymorphic/__init__.py Updates runtime package version constant.
pyproject.toml Updates project package version metadata.
docs/changelog/index.rst Documents the pylint fix in the changelog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/polymorphic/__init__.py 100.00% <100.00%> (ø)
src/polymorphic/managers.py 98.66% <ø> (ø)
src/polymorphic/related_descriptors.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bckohan bckohan merged commit cf863fa into django-commons:main May 29, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pylint issue starting in version 4.11.0: E1111 assignment-from-no-return

3 participants