From 73289427ba6cef74090678b1e365cb0399bfd4fa Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 20 Jun 2019 23:46:34 +0200 Subject: [PATCH] Modules should be accessible if column is not None --- pythonx/jedi_vim.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 382d5c9..c759d33 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -311,7 +311,7 @@ def goto(mode="goto"): echo_highlight("Couldn't find any definitions for this.") elif len(definitions) == 1 and mode != "related_name": d = list(definitions)[0] - if d.module_path is None: + if d.column is None: if d.is_keyword: echo_highlight("Cannot get the definition of Python keywords.") else: @@ -374,7 +374,7 @@ def show_goto_multi_results(definitions): """Create a quickfix list for multiple definitions.""" lst = [] for d in definitions: - if d.module_path is None: + if d.column is None: # Typically a namespace, in the future maybe other things as # well. lst.append(dict(text=PythonToVimStr(d.description))) @@ -740,7 +740,7 @@ def py_import(): except IndexError: echo_highlight('Cannot find %s in sys.path!' % import_path) else: - if completion.module_path is None: + if completion.column is None: # Python modules always have a line number. echo_highlight('%s is a builtin module.' % import_path) else: cmd_args = ' '.join([a.replace(' ', '\\ ') for a in args])