microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 768 forks source link

Autocomplete for Literal with formatted string type hint #5333

Open H41D4x opened 8 months ago

H41D4x commented 8 months ago

If you have a question about a behavior that you’re seeing in pyright, consider posting to the Pyright discussion forum.

Is your feature request related to a problem? Please describe. A clear and concise description of the problem.

For normal strings, i can get the autcomplete working perfectly fine, but the same doesn't happen for b prefixed strings in Literal type hints:

image

image

Describe the solution you’d like A clear and concise description of the solution you would like to see.

It would be amazing if we could get autocomplete for also b prefixed strings! (i understand that f strings wouldn't be possible since they allow interpolation, so the check could only happen at runtime? but for b strings it should be ok, right?)

erictraut commented 8 months ago

@debonte, @rchiodo, since this is a language server feature request, could you please transfer it to the pylance issue tracker?