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

Give priority to enum member values in code completion #1977

Closed
talldeveloper opened this issue Oct 25, 2021 · 4 comments
Closed

Give priority to enum member values in code completion #1977

talldeveloper opened this issue Oct 25, 2021 · 4 comments
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@talldeveloper
Copy link

Code completion for Enum classes will show the enum member values intermixed with the member functions of the enum.

enum_code_completion

In this case, the enum has three member values: TEXT, NUMBER and DATETIME. It would make sense if those are at the top of the code completion list, since you are interested in them 99% of the time. Instead, they are intermixed with other members, like mro, name and register (and I even had a production example where some of the values were all the way at the bottom of the list).

Can the enum member values be given a highter priority than the other members?

@yvvt0379
Copy link

Strongly agree!!!

@judej judej added the enhancement New feature or request label Oct 25, 2021
@github-actions github-actions bot removed the triage label Oct 25, 2021
@binh-vu
Copy link

binh-vu commented Nov 1, 2021

An up vote for this features. Moving from Pycharm, I definitely miss this a lot.

@erictraut
Copy link
Contributor

Thanks for the suggestion. I've implemented the proposed solution. It will be included in the next release of pylance.

@erictraut erictraut added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Nov 1, 2021
@heejaechang
Copy link
Contributor

fixed in 2021.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

6 participants