summaryrefslogtreecommitdiff
path: root/astroid/arguments.py
diff options
context:
space:
mode:
authorhippo91 <guillaume.peillex@gmail.com>2020-11-22 15:03:33 +0100
committerhippo91 <guillaume.peillex@gmail.com>2020-11-22 15:03:33 +0100
commit8dafae9732bd4f3c16c4472952dfcb98dded5a78 (patch)
tree94c98accfe50bd1eef2925fbc50079d158bf02b0 /astroid/arguments.py
parent46297774d1a0e57815500a50b2323ea906bd50da (diff)
downloadastroid-git-8dafae9732bd4f3c16c4472952dfcb98dded5a78.tar.gz
When inferring argument takes into account possible posonyargs before raising 'too many positional arguments'
Diffstat (limited to 'astroid/arguments.py')
-rw-r--r--astroid/arguments.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/arguments.py b/astroid/arguments.py
index 5f4d9092..a0db3924 100644
--- a/astroid/arguments.py
+++ b/astroid/arguments.py
@@ -173,7 +173,7 @@ class CallSite:
# Too many arguments given and no variable arguments.
if len(self.positional_arguments) > len(funcnode.args.args):
- if not funcnode.args.vararg:
+ if not funcnode.args.vararg and not funcnode.args.posonlyargs:
raise exceptions.InferenceError(
"Too many positional arguments "
"passed to {func!r} that does "