summaryrefslogtreecommitdiff
path: root/astroid/inference.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-02-01 11:53:36 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2016-02-13 14:08:58 +0000
commit6d2529632bae545ff7564501cac14316d5ea9204 (patch)
treecfcb11c01f1ddd4806a24469687a1ebc18bd41f4 /astroid/inference.py
parent18fa724c04c2393b134d57d4fe4cebe38472bad8 (diff)
downloadastroid-git-6d2529632bae545ff7564501cac14316d5ea9204.tar.gz
Changed the way how parameters are being built
The old way consisted in having the parameter names, their defaults and their annotations separated in different components of the Arguments node. We introduced a new Param node, which holds the name of a parameter, its default value and its annotation. If any of the last two values are missing, then that slot will be filled with a new node kind, Empty, which is used for specifying the lack of something (None could have been used instead, but that means having non-AST nodes in the Arguments node). We're also having support for positional only arguments, for the moment only in raw_building. Close #215
Diffstat (limited to 'astroid/inference.py')
-rw-r--r--astroid/inference.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/astroid/inference.py b/astroid/inference.py
index 1a7ce413..e4074bc1 100644
--- a/astroid/inference.py
+++ b/astroid/inference.py
@@ -698,6 +698,7 @@ def infer_arguments(self, context=None, nodes=None):
@infer.register(treeabc.AssignName)
@infer.register(treeabc.AssignAttr)
+@infer.register(treeabc.Parameter)
@decorators.path_wrapper
def infer_assign(self, context=None):
"""infer a AssignName/AssignAttr: need to inspect the RHS part of the