mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-28 07:02:09 +08:00
And by changing small things about NamePart/InstanceElement usage, we're finally able to pass the class tests again.
This commit is contained in:
@@ -246,11 +246,11 @@ def get_instance_el(evaluator, instance, var, is_class_var=False):
|
||||
"""
|
||||
if isinstance(var, (Instance, compiled.CompiledObject, pr.Operator, Token,
|
||||
pr.Module, FunctionExecution, pr.NamePart)):
|
||||
if isinstance(var, pr.NamePart) and False:
|
||||
if isinstance(var, pr.NamePart):
|
||||
# TODO temp solution, remove later, NameParts should never get
|
||||
# here?
|
||||
par = get_instance_el(evaluator, instance, var.parent, is_class_var)
|
||||
return helpers.FakeName(unicode(var), par, var.start_pos)
|
||||
return pr.NamePart(var._sub_module, unicode(var), par, var.start_pos)
|
||||
return var
|
||||
|
||||
var = wrap(evaluator, var)
|
||||
|
||||
Reference in New Issue
Block a user