mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-08 11:34:51 +08:00
NotFoundError was deprecated in Jedi a while ago
This commit is contained in:
@@ -235,7 +235,6 @@ def goto(mode="goto", no_output=False):
|
|||||||
:rtype: list
|
:rtype: list
|
||||||
"""
|
"""
|
||||||
script = get_script()
|
script = get_script()
|
||||||
try:
|
|
||||||
if mode == "goto":
|
if mode == "goto":
|
||||||
definitions = [x for x in script.goto_definitions()
|
definitions = [x for x in script.goto_definitions()
|
||||||
if not x.in_builtin_module()]
|
if not x.in_builtin_module()]
|
||||||
@@ -247,10 +246,8 @@ def goto(mode="goto", no_output=False):
|
|||||||
definitions = script.goto_definitions()
|
definitions = script.goto_definitions()
|
||||||
elif mode == "assignment":
|
elif mode == "assignment":
|
||||||
definitions = script.goto_assignments()
|
definitions = script.goto_assignments()
|
||||||
except jedi.NotFoundError:
|
|
||||||
echo_highlight("Cannot follow nothing. Put your cursor on a valid name.")
|
|
||||||
definitions = []
|
|
||||||
else:
|
|
||||||
if no_output:
|
if no_output:
|
||||||
return definitions
|
return definitions
|
||||||
if not definitions:
|
if not definitions:
|
||||||
|
|||||||
Reference in New Issue
Block a user