Skip to content

Commit

Permalink
Reserve 'too-many-positional' / 'R0917' for later use (#9278)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas authored Dec 13, 2023
1 parent b1d8b4c commit 278de0f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
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

0 comments on commit 278de0f

Please sign in to comment.