Autocomplete for tuple[Literal[...]]
in __getitem__
#6250
kc0506
started this conversation in
Enhancement
Replies: 1 comment
-
Thank you for the report. I think is is more of an enhancement request. I'll move it to discussions for upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When indexing an instance with a
tuple
, provide autocomplete options as if using a normalLiteral
type.Current behavior
When using
tuple[Literal]
on normal functions, the autocomplete works.When used
Literal
alone on__getitem__
, it also works.When combining together, it does not work. (But the type checking still works if the type is not correct.)
Example use case
It can provide convenience for dataframe-like objects.
Beta Was this translation helpful? Give feedback.
All reactions