conda update spyder
(or pip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
For some functions the calltip does not show up in the editor (but does in the console)
import numpy as np
x = np.linspace(
inWith other functions like np.arange
the calltip shows up in both the editor and the console.
# Mandatory:
atomicwrites >=1.2.0 : 1.3.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.13.0 (OK)
jedi =0.15.2 : 0.15.2 (OK)
keyring : None (OK)
nbconvert >=4.0 : 5.6.1 (OK)
numpydoc >=0.6.0 : 0.9.2 (OK)
parso =0.5.2 : 0.5.2 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.7.0 (OK)
pygments >=2.0 : 2.6.1 (OK)
pylint >=0.25 : 2.4.4 (OK)
pyls >=0.31.9;<0.32.0 : 0.31.9 (OK)
qdarkstyle >=2.8 : 2.8 (OK)
qtawesome >=0.5.7 : 0.7.0 (OK)
qtconsole >=4.6.0 : 4.7.1 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.3 (OK)
sphinx >=0.6.6 : 2.4.0 (OK)
spyder_kernels >=1.9.0;<1.10.0 : 1.9.0 (OK)
watchdog : None (OK)
xdg >=0.26 : 0.26 (OK)
zmq >=17 : 18.1.1 (OK)
# Optional:
cython >=0.21 : None (OK)
matplotlib >=2.0.0 : 3.1.3 (OK)
numpy >=1.7 : 1.18.1 (OK)
pandas >=0.13.1 : None (OK)
scipy >=0.17.0 : 1.4.1 (OK)
sympy >=0.7.3 : None (OK)
You're right and thanks for reporting. We'll take a look at this in the coming weeks.
@ccordoba12 @remisalmon after some testing seems like the issue is in Jedi.
Testing with Jedi 0.15.2
an empty list is retrieved by call_signatures
:
from jedi import Script
txt = """import numpy as np
np.linspace(
"""
script = Script(txt, 2, 12)
call_signature = script.call_signatures()
call_signature -> []
While with Jedi 0.14.1
, a signature is retrieved:
from jedi import Script
txt = """import numpy as np
np.linspace(
"""
script = Script(txt, 2, 12)
call_signature = script.call_signatures()
call_signature -> [<CallSignature: linspace index=0 params=[start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0]>]
@dalthviz, what happens with Jedi 0.16?
Will check :+1:
I can reproduce @dalthviz's tests: call_signatures
on np.linspace
does not work with jedi==0.15.2
but does with 0.16.0
(and 0.15.1
too...)
@ccordoba12 with jedi 0.16
a Signature
is retrieved ([<Signature: index=0 linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)>]
).
Updating the pyls requirement to allow jedi<=0.16
works for me:
Also, thank you @remisalmon for checking the other Jedi versions :+1:
Ok, thanks @dalthviz!
@andfoy, this should be fixed once we update to Jedi 0.17 in the PyLS and here. However, to test that it doesn't break in future Jedi versions, please add a test for it in the PyLS repo.
I can confirm this was fixed by updating to Jedi 0.17.