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

rich_click.rich_click does not show up in auto-complete in VSCode #52

Closed
taranlu-houzz opened this issue Apr 1, 2022 · 6 comments
Closed

Comments

@taranlu-houzz
Copy link
Contributor

Not sure if this is an issue with my own VSCode setup, but for some reason, I am not getting proper autocompletions for rich_click on lines after the import. As I type the import I do get the expected completions, but after that, when using the imported module, they don't show up.

image

image

Because the completion for rich_click.r did not show rich_click, I was confused for a moment.

@taranlu-houzz
Copy link
Contributor Author

I should add that the code all works properly (e.g. I am able to use rich_click.rich_click.* as expected).

@ewels
Copy link
Owner

ewels commented Apr 27, 2022

Is this issue related to #57 ?

@taranlu-houzz
Copy link
Contributor Author

Hmm, I'm not sure.. I don't really see how the *args/**kwargs issue mentioned would be related, but maybe?

@ewels
Copy link
Owner

ewels commented Apr 27, 2022

Right, sorry - skim reading a bit too quickly.

Ok going back over your issue I think that this is due to some confusion over what's happening, not helped by the double use of the name rich_click. The first screenshot shows available imports, the second shows available imported attributes.

So, in your second screenshot, you have imported rich_click but not rich_click.rich_click. This submodule is not imported by the main package, which is why it isn't suggesting stuff under it - those things are not yet available. The suggestions show the methods available in the top-level rich_click, not available submodule imports.

If I import rich_click.rich_click instead of just rich_click then the autosuggestions work fine:

image

image

Does this make sense? Apologies for the confusing naming. I did it this way because most people will be doing import rich_click as click. Then accessing click.rich_click makes sense..

@taranlu-houzz
Copy link
Contributor Author

@ewels Ah, haha, my bad. In hindsight, that makes sense. Thanks for pointing that out!

@ewels
Copy link
Owner

ewels commented Apr 27, 2022

No worries! Thanks for reporting, I suspect you won't be the only person coming across this..

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