Skip to content

[style] Use default 'dummy-variable-rgx' and 'ignored-argument-names' #8014

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

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
3 changes: 0 additions & 3 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,9 +1583,6 @@ def visit_call(self, node: nodes.Call) -> None:

# 3. Match the **kwargs, if any.
if node.kwargs:
# TODO: It's possible to remove this disable by using dummy-variables-rgx
# see https://github.com./PyCQA/pylint/pull/7697#discussion_r1010832518
# pylint: disable-next=unused-variable
for i, [(name, _defval), _assigned] in enumerate(parameters):
# Assume that *kwargs provides values for all remaining
# unassigned named parameters.
Expand Down
5 changes: 1 addition & 4 deletions pylint/extensions/docparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def _compare_different_args(
confidence=HIGH,
)

def _compare_ignored_args(
def _compare_ignored_args( # pylint: disable=useless-param-doc
self,
found_argument_names: set[str],
message_id: str,
Expand All @@ -478,11 +478,8 @@ def _compare_ignored_args(
generate a message if there are ignored arguments found.

:param found_argument_names: argument names found in the docstring

:param message_id: pylint message id

:param ignored_argument_names: Expected argument names

:param warning_node: The node to be analyzed
"""
existing_ignored_argument_names = ignored_argument_names & found_argument_names
Expand Down
2 changes: 0 additions & 2 deletions pylint/testutils/unittest_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
class UnittestLinter(PyLinter):
"""A fake linter class to capture checker messages."""

# pylint: disable=unused-argument

def __init__(self) -> None:
self._messages: list[MessageTest] = []
super().__init__()
Expand Down
8 changes: 0 additions & 8 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ ignore-signatures=yes
# Tells whether we should check for unused import in __init__ files.
init-import=no

# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy

# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
Expand All @@ -195,10 +191,6 @@ allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=

# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*

# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
Expand Down