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

spyder autocompletion will fail in nested modules #21200

Closed
jcbritobr opened this issue Jul 30, 2023 · 2 comments
Closed

spyder autocompletion will fail in nested modules #21200

jcbritobr opened this issue Jul 30, 2023 · 2 comments

Comments

@jcbritobr
Copy link

Hello

Python 3.11.4 64-bit | Qt 5.15.2 | PyQt5 5.15.9 | Linux 6.4.6-200.fc38.x86_64 (x86_64)
spyder 5.4.4 linux

When using some nested functions and modules, autocomplete will fail

import matplotlib.pyplot as plt

fig, ax = plt.subplots(..)
ax. #%% after, here autocomplete will fail
@ccordoba12
Copy link
Member

Hey @jcbritobr, thanks for reporting. This is a known limitation of Python's auto-completion machinery (see issue #2162) and we'll try to improve it in Spyder 6 (but I don't know if we'll have time for it).

In the meantime, you can add typing information to your fig, ax statements, as described here:

https://stackoverflow.com/a/62478431/438386

That will give you the expected auto-completions for both fig and ax. Please try that and let us know if it works for you.

@ccordoba12
Copy link
Member

Closing due to lack of response.

@ccordoba12 ccordoba12 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants