summaryrefslogtreecommitdiff
path: root/astroid/protocols.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-07 13:13:29 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-07 13:13:29 +0300
commitd35aad3f97ce329742d554a5960f8494d7727154 (patch)
treef47981c8de28d4be93bea697bf52c75711a8db50 /astroid/protocols.py
parente5df09d8d51250bfb277d18fc6a299c1997100ee (diff)
downloadastroid-d35aad3f97ce329742d554a5960f8494d7727154.tar.gz
Change the signature of the ArgumentInference class to accept directly the arguments and the keywords of a call site.
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r--astroid/protocols.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py
index 1a80dfa..24a85fa 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -282,7 +282,8 @@ def _arguments_infer_argname(self, name, context):
return
if context and context.callcontext:
- inferator = arguments.ArgumentInference(context.callcontext)
+ inferator = arguments.ArgumentInference(context.callcontext.args,
+ context.callcontext.keywords)
for value in inferator.infer_argument(self.parent, name, context):
yield value
return
@@ -315,8 +316,10 @@ def arguments_assigned_stmts(self, node, context, asspath=None):
callcontext = context.callcontext
context = contextmod.copy_context(context)
context.callcontext = None
- return arguments.ArgumentInference(callcontext).infer_argument(
- self.parent, node.name, context)
+ inferator = arguments.ArgumentInference(
+ callcontext.args,
+ callcontext.keywords)
+ return inferator.infer_argument(self.parent, node.name, context)
return _arguments_infer_argname(self, node.name, context)
nodes.Arguments.assigned_stmts = arguments_assigned_stmts