diff options
author | hippo91 <guillaume.peillex@gmail.com> | 2020-11-22 15:03:33 +0100 |
---|---|---|
committer | hippo91 <guillaume.peillex@gmail.com> | 2020-11-22 15:03:33 +0100 |
commit | 8dafae9732bd4f3c16c4472952dfcb98dded5a78 (patch) | |
tree | 94c98accfe50bd1eef2925fbc50079d158bf02b0 /astroid/arguments.py | |
parent | 46297774d1a0e57815500a50b2323ea906bd50da (diff) | |
download | astroid-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.py | 2 |
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 " |