Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete/bad autocompletion results with numpy #14977

Closed
8 of 10 tasks
remisalmon opened this issue Mar 22, 2021 · 2 comments
Closed
8 of 10 tasks

Incomplete/bad autocompletion results with numpy #14977

remisalmon opened this issue Mar 22, 2021 · 2 comments

Comments

@remisalmon
Copy link
Contributor

remisalmon commented Mar 22, 2021

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Spyder's autocompletion sometimes give incomplete or bad results when using numpy, for ex:

  • np.datetime64 does not show up in the completions even though the function exists
  • np.fft.arange shows up in the completions even though there are no np.fft.arange function

Those issues are not present when using the ipython console.

What steps reproduce the problem?

  1. import numpy as np
  2. np.datetime + tab does not show np.datetime64 in the editor (but does in the ipython console)
  3. np.fft.shows np.fft.arange in the editor (but does not in the ipython console)

What is the expected output? What do you see instead?

Spyder's editor should show the same (correct) completions as the ipython console does. Why not using the same completion engine?

Versions

  • Spyder version: 4.2.3
  • Python version: 3.8.8
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Linux/Fedora 33

Dependencies

# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=7.6.0                 :  7.21.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  22.3.0 (OK)
nbconvert >=4.0                 :  6.0.7 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.8.0 (OK)
pygments >=2.0                  :  2.8.1 (OK)
pylint >=1.0                    :  2.7.2 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.2             :  0.3.2 (OK)
qdarkstyle >=2.8                :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.2 (OK)
qtconsole >=5.0.1               :  5.0.2 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
rtree >=0.8.3                   :  None (NOK)
setuptools >=39.0.0             :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                  :  3.5.2 (OK)
spyder_kernels >=1.10.2;<1.11.0 :  1.10.2 (OK)
textdistance >=4.2.0            :  4.2.1 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0        :  1.0.2 (OK)
xdg >=0.26                      :  0.27 (OK)
zmq >=17                        :  20.0.0 (OK)

# Optional:
cython >=0.21                   :  None (NOK)
matplotlib >=2.0.0              :  None (NOK)
numpy >=1.7                     :  None (NOK)
pandas >=1.1.1                  :  None (NOK)
scipy >=0.17.0                  :  None (NOK)
sympy >=0.7.3                   :  None (NOK)
@ccordoba12
Copy link
Member

Hey @remisalmon, thanks for reporting. This has been asked many times in the past.

Please see my answer in StackOverflow about it, which still applies:

https://stackoverflow.com/questions/42777430/why-autocompletion-options-in-spyder-3-1-are-not-fully-working-in-the-editor

@ccordoba12
Copy link
Member

I'm closing this one as a duplicate of issue #2162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants