Skip to content

[pylint] Standardize diagnostic message (PLR0914, PLR0917)#24996

Merged
ntBre merged 1 commit into
astral-sh:mainfrom
brian-c11:fix/plr0914-plr0917-delimiter
May 6, 2026
Merged

[pylint] Standardize diagnostic message (PLR0914, PLR0917)#24996
ntBre merged 1 commit into
astral-sh:mainfrom
brian-c11:fix/plr0914-plr0917-delimiter

Conversation

@brian-c11
Copy link
Copy Markdown
Contributor

Summary

PLR0914 (too-many-locals) and PLR0917 (too-many-positional-arguments) used / as the delimiter between the current and maximum values in their diagnostic messages, while all other comparable pylint rules use >.

Before:

PLR0914 Too many local variables (16/15)
PLR0917 Too many positional arguments (8/5)

After:

PLR0914 Too many local variables (16 > 15)
PLR0917 Too many positional arguments (8 > 5)

This matches the format used by PLR0904, PLR0911, PLR0912, PLR0913, PLR0915, PLR0916, and PLR1702.

Closes #24985

Test plan

  • Updated snapshots for PLR0914 and PLR0917
  • All affected tests pass (too_many_locals, max_positional_args, rule_toomanypositionalarguments_...)

@astral-sh-bot astral-sh-bot Bot requested a review from ntBre May 5, 2026 01:29
…pylint rules

`PLR0914` and `PLR0917` used `/` as the delimiter between the current
and maximum values in their diagnostic messages (e.g. `(16/15)`),
while all other comparable pylint rules (`PLR0904`, `PLR0911`,
`PLR0912`, `PLR0913`, `PLR0915`, `PLR0916`, `PLR1702`) use ` > `
(e.g. `(16 > 15)`). Standardize these two rules to match.

Closes astral-sh#24985
@brian-c11 brian-c11 force-pushed the fix/plr0914-plr0917-delimiter branch from fec2a6a to 2ee4a9e Compare May 5, 2026 01:35
@ntBre ntBre added rule Implementing or modifying a lint rule preview Related to preview mode features labels May 6, 2026
@ntBre ntBre changed the title [PLR0914, PLR0917] Standardize delimiter to > to match other pylint rules [pylint] Standardize diagnostic message (PLR0914, PLR0917) May 6, 2026
Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Thanks!

@ntBre ntBre enabled auto-merge (squash) May 6, 2026 20:31
@ntBre ntBre merged commit 4913c53 into astral-sh:main May 6, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize error formats of PLR0917 and PLR0914

2 participants