From 6acf34efd3737cf72a5a44c5a49475d1a78a06c1 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 19 May 2013 05:07:23 +0200 Subject: [PATCH] Fix: api.defined_names was run against wrong scope when there is only one class is defined in the module. --- jedi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/api.py b/jedi/api.py index e148f350..5d2095e4 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -563,7 +563,7 @@ def defined_names(source, source_path=None, source_encoding='utf-8'): modules.source_to_unicode(source, source_encoding), module_path=source_path, ) - return api_classes._defined_names(parser.scope) + return api_classes._defined_names(parser.module) def preload_module(*modules):