Skip to content

[pylint] Update fix suggestions for __floor__, __trunc__, __length_hint__, and __matmul__ variants (PLC2801) - #26239

Merged
ntBre merged 3 commits into
mainfrom
brent/plc2801-missing-fixes
Jun 23, 2026
Merged

ntBre merged 3 commits into
mainfrom
brent/plc2801-missing-fixes

Conversation

@ntBre

@ntBre ntBre commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #26221 by adding a fix title mapping for __floor__ and __trunc__. __floor__ was missing
entirely, while __trunc__ was misspelled as __truncate__ in the mapping function.

Test Plan

New tests showing the help message

@ntBre ntBre added the diagnostics Diagnostic messages, annotations, fixes & rendering infra--not for PRs that just add new diagnostics label Jun 22, 2026
โ€ฆLC2801`)

Summary
--

Fixes #26221 by adding a fix title mapping for `__floor__` and `__trunc__`. `__floor__` was missing
entirely, while `__trunc__` was misspelled as `__truncate__` in the mapping function.

Test Plan
--

New tests showing the `help` message
@ntBre
ntBre force-pushed the brent/plc2801-missing-fixes branch from b7af8e3 to 1565c6c Compare June 22, 2026 18:25
@astral-sh-bot

astral-sh-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

โœ… ecosystem check detected no linter changes.

Linter (preview)

โœ… ecosystem check detected no linter changes.

@ntBre
ntBre marked this pull request as ready for review June 22, 2026 18:58
@ntBre
ntBre requested a review from MichaReiser June 22, 2026 18:59
@ntBre

ntBre commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

I added __length_hint__ and the __matmul__ variants too based on the new issue comment.

@ntBre ntBre changed the title [pylint] Update fix suggestions for __floor__ and __trunc__ (PLC2801) [pylint] Update fix suggestions for __floor__, __trunc__, __length_hint__, and __matmul__ variants (PLC2801) Jun 23, 2026
@ntBre
ntBre merged commit 2fa7692 into main Jun 23, 2026
45 checks passed
@ntBre
ntBre deleted the brent/plc2801-missing-fixes branch June 23, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Diagnostic messages, annotations, fixes & rendering infra--not for PRs that just add new diagnostics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PLC2801 gives suggestions differentially for the __floor__, __ceil__ and __trunc__ dunders

2 participants