From 609965d07c95ebae789576f9525b06c88bcce1ef Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 1 Jul 2016 20:59:24 +0200 Subject: [PATCH] Finally fix all python 3.4 tests again. --- jedi/api/completion.py | 3 --- jedi/evaluate/compiled/__init__.py | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/jedi/api/completion.py b/jedi/api/completion.py index 35f62d2b..ca648105 100644 --- a/jedi/api/completion.py +++ b/jedi/api/completion.py @@ -127,17 +127,14 @@ class Completion: allowed_keywords, allowed_tokens = \ helpers.get_possible_completion_types(grammar, stack) - print(allowed_keywords, [token.tok_name[a] for a in allowed_tokens]) completion_names = list(self._get_keyword_completion_names(allowed_keywords)) if token.NAME in allowed_tokens: # This means that we actually have to do type inference. symbol_names = list(stack.get_node_names(grammar)) - print('symbolnames',symbol_names) nodes = list(stack.get_nodes()) - last_symbol = symbol_names[-1] if "import_stmt" in symbol_names: level = 0 diff --git a/jedi/evaluate/compiled/__init__.py b/jedi/evaluate/compiled/__init__.py index 66aca20d..425e4290 100644 --- a/jedi/evaluate/compiled/__init__.py +++ b/jedi/evaluate/compiled/__init__.py @@ -303,8 +303,9 @@ class LazyNamesDict(object): # The dir function can be wrong. pass + is_instance = self._is_instance or fake.is_class_instance(obj) # ``dir`` doesn't include the type names. - if not inspect.ismodule(obj) and obj != type and not self._is_instance: + if not inspect.ismodule(obj) and obj != type and not is_instance: values += create(self._evaluator, type).names_dict.values() return values