1
0
forked from VimPlug/jedi

docstring parsing to infer argument types, fixes #40

This commit is contained in:
David Halter
2012-12-02 23:12:45 +01:00
parent c2f5a6a4b9
commit a79b3e2b87
3 changed files with 43 additions and 0 deletions

View File

@@ -369,6 +369,7 @@ class Function(Scope):
self.params = params
for p in params:
p.parent = weakref.ref(self)
p.parent_function = weakref.ref(self)
self.decorators = []
self.returns = []
self.is_generator = False
@@ -872,6 +873,7 @@ class Param(Statement):
self.position_nr = None
self.is_generated = False
self.annotation_stmt = None
self.parent_function = None
def add_annotation(self, annotation_stmt):
annotation_stmt.parent = weakref.ref(self)