mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
jedi error fix
This commit is contained in:
parent
657858f5cd
commit
556db6d124
2 changed files with 30 additions and 3 deletions
24
news/jedierr.rst
Normal file
24
news/jedierr.rst
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
**Added:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Changed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Deprecated:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Removed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Fixed:**
|
||||||
|
|
||||||
|
* Fixed issue with Jedi xontrib incorrectly raising errors
|
||||||
|
during tab completion.
|
||||||
|
|
||||||
|
**Security:**
|
||||||
|
|
||||||
|
* <news item>
|
|
@ -31,10 +31,13 @@ def complete_jedi(prefix, line, start, end, ctx):
|
||||||
src = builtins.__xonsh__.shell.shell.accumulated_inputs + line
|
src = builtins.__xonsh__.shell.shell.accumulated_inputs + line
|
||||||
script = jedi.api.Interpreter(src, [ctx], column=end)
|
script = jedi.api.Interpreter(src, [ctx], column=end)
|
||||||
if builtins.__xonsh__.env.get('CASE_SENSITIVE_COMPLETIONS'):
|
if builtins.__xonsh__.env.get('CASE_SENSITIVE_COMPLETIONS'):
|
||||||
rtn = {x.name_with_symbols for x in script.completions()
|
rtn = {x.name_with_symbols for x in script.completions()
|
||||||
if x.name_with_symbols.startswith(prefix)}
|
if x.name_with_symbols.startswith(prefix)}
|
||||||
else:
|
else:
|
||||||
rtn = {x.name_with_symbols for x in script.completions()}
|
try:
|
||||||
|
rtn = {x.name_with_symbols for x in script.completions()}
|
||||||
|
except Exception:
|
||||||
|
rtn = set()
|
||||||
return rtn
|
return rtn
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue