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 Console autocomplete issues vs VSCode #22533

Closed
mg3146 opened this issue Sep 19, 2024 · 5 comments
Closed

Spyder Console autocomplete issues vs VSCode #22533

mg3146 opened this issue Sep 19, 2024 · 5 comments

Comments

@mg3146
Copy link

mg3146 commented Sep 19, 2024

Hi - this could simply be a setting, but I find that the console's autocomplete to be fairly limited vs when I run the same code in VS Code Jupyter notebooks when working with my own library/code base.

Spyder is installed via conda into the same env that I run my code base from.

For example, when working with nested classes, the Spyder console autocomplete seems to stop after the first level. Ie. in VSCode it'll autocomplete something like a=A.B.C. In spyder I'd have to do x = A.B followed by a=x.C

Any suggestions? Thx

@mg3146 mg3146 changed the title IPython Console autocomplete lackluster Spyder Console autocomplete issues vs VSCode Sep 19, 2024
@dalthviz
Copy link
Member

dalthviz commented Sep 20, 2024

Hi @mg3146 thank you for the feedback! I think over the Spyder IPython Console preferences/Advanced settings there are a couple of options that maybe could improve the completions you get from the consoles. You can find those options over Preferences > IPython Console > Advaced Settings. One is called Jedi completion and the other is Greedy completion. Note that both options are disabled by default due to some possible unwanted side effects like slowing down the console if you are working with big sized variables (Jedi completion) and security considerations (things get evaluated as you ask for a completion when using Greedy completion):

image

Let us know if the info above helps!

@mg3146
Copy link
Author

mg3146 commented Sep 23, 2024

Thanks @dalthviz . I've tried Jedi completion, but I'm not really finding much of a difference. For example, here is a blank console with just pandas.
image
and if I then set it to a variable and hit tab.
image

and my settings just for good order:
image

@dalthviz
Copy link
Member

I think then your use case needs for the Greedy completion to be enabled. Checking locally, when doing the df.head().<Tab> completion while having Greddy completion enabled, I see the following:

console_completion

That's what you were expecting, right? Let us know!

@mg3146
Copy link
Author

mg3146 commented Sep 25, 2024

Greedy did the trick, wayyyy better now. Thanks!

@dalthviz
Copy link
Member

Awesome! I think I will close this then but if you have further feedback let us know!

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