summaryrefslogtreecommitdiff
path: root/astroid/protocols.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r--astroid/protocols.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py
index eada9764..7fdc6e29 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -304,6 +304,7 @@ def mulass_assigned_stmts(self, nodes, node=None, context=None, assign_path=None
@assigned_stmts.register(treeabc.AssignName)
@assigned_stmts.register(treeabc.AssignAttr)
+@assigned_stmts.register(treeabc.Parameter)
def assend_assigned_stmts(self, nodes, node=None, context=None, assign_path=None):
return self.parent.assigned_stmts(self, context=context)
@@ -311,7 +312,7 @@ def assend_assigned_stmts(self, nodes, node=None, context=None, assign_path=None
def _arguments_infer_argname(self, name, context, nodes):
# arguments information may be missing, in which case we can't do anything
# more
- if not (self.args or self.vararg or self.kwarg):
+ if not self.args and (not self.vararg and not self.kwarg):
yield util.Uninferable
return
# first argument of instance/class method
@@ -336,10 +337,10 @@ def _arguments_infer_argname(self, name, context, nodes):
return
# TODO: just provide the type here, no need to have an empty Dict.
- if name == self.vararg:
+ if self.vararg and name == self.vararg.name:
yield nodes.Tuple(parent=self)
return
- if name == self.kwarg:
+ if self.kwarg and name == self.kwarg.name:
yield nodes.Dict(parent=self)
return
# if there is a default value, yield it. And then yield Uninferable to reflect