Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserve 'too-many-positional' / 'R0917' for later use #9278

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/data/messages/t/too-many-positional/details.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reserved message name, not yet implemented.
2 changes: 2 additions & 0 deletions doc/data/messages/t/too-many-positional/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `Ruff discussion <https://github.com/astral-sh/ruff/issues/8946>`_
- `Pylint issue <https://github.com/pylint-dev/pylint/issues/9099>`_
4 changes: 4 additions & 0 deletions doc/user_guide/checkers/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ Design checker Messages
simpler (and so easier to use) class.
:too-many-locals (R0914): *Too many local variables (%s/%s)*
Used when a function or method has too many local variables.
:too-many-positional (R0917): *Too many positional arguments in a function call.*
Will be implemented in https://github.com/pylint-
dev/pylint/issues/9099,msgid/symbol pair reserved for compatibility with
ruff, see https://github.com/astral-sh/ruff/issues/8946.
:too-many-public-methods (R0904): *Too many public methods (%s/%s)*
Used when class has too many public methods, try to reduce this to get a
simpler (and so easier to use) class.
Expand Down
1 change: 1 addition & 0 deletions doc/user_guide/messages/messages_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ All messages in the refactor category:
refactor/too-many-instance-attributes
refactor/too-many-locals
refactor/too-many-nested-blocks
refactor/too-many-positional
refactor/too-many-public-methods
refactor/too-many-return-statements
refactor/too-many-statements
Expand Down
7 changes: 7 additions & 0 deletions pylint/checkers/design_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@
"too-many-boolean-expressions",
"Used when an if statement contains too many boolean expressions.",
),
"R0917": (
"Too many positional arguments in a function call.",
"too-many-positional",
"Will be implemented in https://github.com/pylint-dev/pylint/issues/9099,"
"msgid/symbol pair reserved for compatibility with ruff, "
"see https://github.com/astral-sh/ruff/issues/8946.",
),
}
SPECIAL_OBJ = re.compile("^_{2}[a-z]+_{2}$")
DATACLASSES_DECORATORS = frozenset({"dataclass", "attrs"})
Expand Down
Loading