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