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
How to prevent autocomplete of type hints #3599
Comments
isn't that copilot? |
Could you also let us know what the version of VSCode and Pylance you are using? Also are you using another extension for inline errors? |
I'm using VSCode 1.73.0 and Pylance v2022.11.10. The behaviour (the autocompletion of the type hints) disappears when I disable Pylance, but of course that's not what I'd want to do. Autocomplete of just |
Could be intellicode. you could try disabling that extension |
I'm afraid it's not intellicode. Same behaviour uninstalling it. Maybe my issue is pretty easy to replicate if you're interested to debug it. I'm pretty sure the type hints autocompletion comes from Pylance. |
Ah.. I see it now.. yes we are including the annotation type from the django stubs. this could be an enhancement to control annotation printing. |
so the behavior is because of this - https://github.com/microsoft/pyright/blob/main/packages/pyright-internal/src/languageService/completionProvider.ts#L985 currently there is no option to control the behavior. |
Thanks for spotting the cause. Yes, it would be great to be able to toggle this behaviour on/off because it wastes a lot of time for people not using annotation types. |
we are discussing a way to mitigate the issue. either providing option to toggle, or use type checking mode, or provide separate completion that has the type annotation when user type we are currently leaning to separete completion after |
Thanks, that's great, as soon as it still lets autocomplete the variable alone if we don't type the colon ( |
This issue has been fixed in prerelease version 2022.11.41, which we've just released. You can find the changelog here: CHANGELOG.md |
I would like to deactivate the autocompletion of type hints, such as described in the video below.
Screen.Recording.2022-11-09.at.16.19.58.mov
How can I get rid of those type hints in the autocomplete?
The text was updated successfully, but these errors were encountered: