Is there any way to type hint a non-None hashable? #8265
JanEricNitschke
started this conversation in
General
Replies: 1 comment 4 replies
-
The only idea i have at the moment would be to add an overload of
But that would probably only handle the case where you want to assign the return value and not where it is used for side effects. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Specifically for a function like:
Again specifically in the usecase of pandas stubs where
df.drop()
raises this errorValueError: Need to specify at least one of 'labels', 'index' or 'columns'
which i would like to encode in the overloaded signatures.Beta Was this translation helpful? Give feedback.
All reactions