Intellisense support for magic methods when using complex generic types #4960
girip11
started this conversation in
Enhancement
Replies: 1 comment
-
Moving this issue to discussion as an enhancement request for comments and 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
-
This pylance feature request is based on the discussion captured in the issue
Consider the below snippet.
Intellisense WORKS WELL when I type
c.locate("")
as well asc.locate([""])
. Refer the image below.Here are my feature requests with Intellisense support for the magic methods.
__getattr__
when the type parameter is explicitly coded. But it currently doesn't support generic type parameters. This will be very useful to restrict the possible attributes that can be called on a particular type.And the magic method
__getitem__
currently supports generic type, but it doesn't support a signature like the one given in the above example. As discussed in the issue Unable to autosuggest members with typing.Literal types when used in Generic classes #4938, I am adding this to the feature request.It will be great, in general if the Intellisense could work for other magic methods like
__setitem__
,__setattr__
with generic types.Beta Was this translation helpful? Give feedback.
All reactions