1
0
forked from VimPlug/jedi

Improvements towards arrays / predefined names logic.

This commit is contained in:
Dave Halter
2016-11-25 23:31:45 +01:00
parent 8fd08c86b7
commit bad1f85f8f
14 changed files with 158 additions and 167 deletions

View File

@@ -112,10 +112,10 @@ def _check_for_setattr(instance):
def add_attribute_error(evaluator, scope, name):
message = ('AttributeError: %s has no attribute %s.' % (scope, name))
from jedi.evaluate.representation import Instance
from jedi.evaluate.instance import AbstractInstanceContext
# Check for __getattr__/__getattribute__ existance and issue a warning
# instead of an error, if that happens.
if isinstance(scope, Instance):
if isinstance(scope, AbstractInstanceContext):
typ = Warning
try:
scope.get_subscope_by_name('__getattr__')