wrap some more values with er.wrap

This commit is contained in:
Dave Halter
2014-08-20 13:52:49 +02:00
parent c9542cbc04
commit 442a1a1d08
2 changed files with 2 additions and 11 deletions

View File

@@ -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()

View File

@@ -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)