From 292366d3a6e6e526601362bb6d33b8f298662182 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 10 Nov 2015 21:30:08 +0100 Subject: [PATCH] Fix an issue in the API that was created by creating set types. --- jedi/api/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 8b72e26f..bff52d77 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -365,7 +365,10 @@ class Script(object): definitions = resolve_import_paths(definitions) names = [s.name for s in definitions] defs = [classes.Definition(self._evaluator, name) for name in names] - return helpers.sorted_definitions(defs) + # The additional set here allows the definitions to become unique in an + # API sense. In the internals we want to separate more things than in + # the API. + return helpers.sorted_definitions(set(defs)) def goto_assignments(self): """