forked from VimPlug/jedi
jedi understands type now, not the metaclass one, though
This commit is contained in:
+9
-7
@@ -505,8 +505,11 @@ class Execution(Executable):
|
|||||||
stmts += follow_path(iter([key]), obj, self.base)
|
stmts += follow_path(iter([key]), obj, self.base)
|
||||||
return stmts
|
return stmts
|
||||||
elif func_name == 'type':
|
elif func_name == 'type':
|
||||||
print 'LALA'
|
# otherwise it would be a metaclass
|
||||||
raise NotImplementedError()
|
if len(self.var_args) == 1:
|
||||||
|
objects = follow_call_list([self.var_args[0]])
|
||||||
|
print 'LALA', objects, [o.base for o in objects if isinstance(o, Instance)]
|
||||||
|
return [o.base for o in objects if isinstance(o, Instance)]
|
||||||
|
|
||||||
if self.base.isinstance(Class):
|
if self.base.isinstance(Class):
|
||||||
# There maybe executions of executions.
|
# There maybe executions of executions.
|
||||||
@@ -1188,15 +1191,14 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False,
|
|||||||
break
|
break
|
||||||
break_scopes.append(p)
|
break_scopes.append(p)
|
||||||
|
|
||||||
print 'b', flow_scope, name_str, result
|
|
||||||
|
|
||||||
while flow_scope:
|
while flow_scope:
|
||||||
# TODO check if result is in scope -> no evaluation necessary
|
# TODO check if result is in scope -> no evaluation necessary
|
||||||
n = dynamic.check_flow_information(flow_scope, name_str,
|
n = dynamic.check_flow_information(flow_scope, name_str,
|
||||||
position)
|
position)
|
||||||
print
|
if n:
|
||||||
print 'n', n, flow_scope
|
result = n
|
||||||
if n and result:
|
break
|
||||||
|
if n and result: # TODO remove this crap :-)
|
||||||
result = n + [p for p in result if not check_for_param(r)]
|
result = n + [p for p in result if not check_for_param(r)]
|
||||||
elif n:
|
elif n:
|
||||||
result = n
|
result = n
|
||||||
|
|||||||
Reference in New Issue
Block a user