-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
From micro codery on typing-sig:
It was only after seeing the solution that I could find docs describing it on mypy.readthedocs. There is a note claiming that a generic self is still experimental but maybe a convention should be added to the typeshed contributing guide about using it, just like Sequence is recommended over list.
I suggest that in the future we shouldn't accept
__enter__()
methods returningself
anymore that don't use a type var.
I think we should do both of these things. We can find some existing offenders with git grep 'def __enter__(self) -> [A-Z]'
.
Metadata
Metadata
Assignees
Labels
No labels