diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-01-02 20:11:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 20:11:44 +0100 |
commit | 624a5dbec2f31488cc562b8b05445b1242432ca1 (patch) | |
tree | 7a53542447bf7053f251b2561fa94c9e911492f1 | |
parent | 43be0f181fbc5be1cb2ddcf39eb9d5de093f2f9c (diff) | |
download | pylint-git-624a5dbec2f31488cc562b8b05445b1242432ca1.tar.gz |
[style] Use default 'dummy-variable-rgx' and 'ignored-argument-names' (#8014)
Refs #8013
Refs https://github.com/PyCQA/pylint/pull/7697#discussion_r1010869312
-rw-r--r-- | pylint/checkers/typecheck.py | 3 | ||||
-rw-r--r-- | pylint/extensions/docparams.py | 5 | ||||
-rw-r--r-- | pylint/testutils/unittest_linter.py | 2 | ||||
-rw-r--r-- | pylintrc | 8 |
4 files changed, 1 insertions, 17 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index d622b3d57..febbbf1de 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -1583,9 +1583,6 @@ accessed. Python regular expressions are accepted.", # 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. diff --git a/pylint/extensions/docparams.py b/pylint/extensions/docparams.py index 103c5ce56..0c2e4e9e3 100644 --- a/pylint/extensions/docparams.py +++ b/pylint/extensions/docparams.py @@ -467,7 +467,7 @@ class DocstringParameterChecker(BaseChecker): confidence=HIGH, ) - def _compare_ignored_args( + def _compare_ignored_args( # pylint: disable=useless-param-doc self, found_argument_names: set[str], message_id: str, @@ -478,11 +478,8 @@ class DocstringParameterChecker(BaseChecker): 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 diff --git a/pylint/testutils/unittest_linter.py b/pylint/testutils/unittest_linter.py index 2fc7cef08..a519680f1 100644 --- a/pylint/testutils/unittest_linter.py +++ b/pylint/testutils/unittest_linter.py @@ -24,8 +24,6 @@ else: 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__() @@ -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= @@ -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 |