From 586ac9d01399cb6953dc66b281c8131e14be3efa Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 10 May 2014 20:31:33 +0200 Subject: [PATCH] removed a few debug things. --- jedi/evaluate/finder.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jedi/evaluate/finder.py b/jedi/evaluate/finder.py index 1ceccc2d..4182dc21 100644 --- a/jedi/evaluate/finder.py +++ b/jedi/evaluate/finder.py @@ -37,6 +37,13 @@ class NameFinder(object): def find(self, scopes, resolve_decorator=True): names = self.filter_name(scopes) types = self._names_to_types(names, resolve_decorator) + + if not names and not types \ + and not (isinstance(self.name_str, pr.NamePart) + and isinstance(self.name_str.parent.parent, pr.Param)): + if not isinstance(self.name_str, (str, unicode)): # TODO Remove + analysis.add(self._evaluator, 'attribute-error', self.name_str) + debug.dbg('finder._names_to_types: %s, old: %s', names, types) return self._resolve_descriptors(types) @@ -198,14 +205,6 @@ class NameFinder(object): # handling __getattr__ / __getattribute__ types = self._check_getattr(self.scope) - if not names and not types \ - and not (isinstance(self.name_str, pr.NamePart) - and isinstance(self.name_str.parent.parent, pr.Param)): - if not isinstance(self.name_str, (str, unicode)): # TODO Remove - analysis.add(self._evaluator, 'attribute-error', self.name_str) - print(self.scope, self.name_str.parent.parent, self.name_str, self.position, - self.name_str.start_pos) - return types def _remove_statements(self, stmt):