summaryrefslogtreecommitdiff
path: root/pylint
diff options
context:
space:
mode:
authorMark Byrne <31762852+mbyrnepr2@users.noreply.github.com>2023-04-10 05:10:58 +0200
committerGitHub <noreply@github.com>2023-04-09 23:10:58 -0400
commitdb17860fd61154c59f3acc13ff34b120cc5ba091 (patch)
treecb1a9248a714b46fc3427660364e29e1f4bd486d /pylint
parentb63c8a1c148e85e1ad4e645b7fffd8c8772d6201 (diff)
downloadpylint-git-db17860fd61154c59f3acc13ff34b120cc5ba091.tar.gz
Fix false positive for ``positional-only-arguments-expected`` when a function contains both a positional-only parameter that has a default value, and ``**kwargs``. (#8556)
Diffstat (limited to 'pylint')
-rw-r--r--pylint/checkers/method_args.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pylint/checkers/method_args.py b/pylint/checkers/method_args.py
index 37db2fa79..59083fa25 100644
--- a/pylint/checkers/method_args.py
+++ b/pylint/checkers/method_args.py
@@ -111,6 +111,8 @@ class MethodArgsChecker(BaseChecker):
and inferred_func.args.posonlyargs
):
return
+ if inferred_func.args.kwarg:
+ return
pos_args = [a.name for a in inferred_func.args.posonlyargs]
kws = [k.arg for k in node.keywords if k.arg in pos_args]
if not kws: