mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
wrap some more values with er.wrap
This commit is contained in:
@@ -231,12 +231,7 @@ class NameFinder(object):
|
|||||||
else:
|
else:
|
||||||
types += self._remove_statements(typ, name)
|
types += self._remove_statements(typ, name)
|
||||||
else:
|
else:
|
||||||
if isinstance(typ, pr.Class):
|
typ = er.wrap(evaluator, typ)
|
||||||
typ = er.Class(evaluator, typ)
|
|
||||||
elif isinstance(typ, pr.Function):
|
|
||||||
typ = er.Function(evaluator, typ)
|
|
||||||
elif isinstance(typ, pr.Module):
|
|
||||||
typ = er.ModuleWrapper(evaluator, typ)
|
|
||||||
|
|
||||||
if typ.isinstance(er.Function) and resolve_decorator:
|
if typ.isinstance(er.Function) and resolve_decorator:
|
||||||
typ = typ.get_decorated_func()
|
typ = typ.get_decorated_func()
|
||||||
|
|||||||
@@ -236,11 +236,7 @@ def get_instance_el(evaluator, instance, var, is_class_var=False):
|
|||||||
pr.Module, FunctionExecution)):
|
pr.Module, FunctionExecution)):
|
||||||
return var
|
return var
|
||||||
|
|
||||||
if isinstance(var, pr.Function):
|
var = wrap(evaluator, var)
|
||||||
var = Function(evaluator, var)
|
|
||||||
elif isinstance(var, pr.Class):
|
|
||||||
var = Class(evaluator, var)
|
|
||||||
|
|
||||||
return InstanceElement(evaluator, instance, var, is_class_var)
|
return InstanceElement(evaluator, instance, var, is_class_var)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user