-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
Typingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checking
Description
We recently upgraded the mypy requirement to mypy v1.0. One of the new capabilities of mypy 1.0 is that it can now type check the Self type. I propose we use Self for self type checking in Pandas instead if as we currently do, using TypeVars.
One issue with type checking using Self, is that Self was added only in python 3.11, while Pandas supports Python >= 3.8. However, Self has been added to typing_extensions , so if we add type_extensions as a Pandas dependency for Python <3.11, we can use Self for type checking purposes in Pandas.
jbrockmendel
Metadata
Metadata
Assignees
Labels
Typingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checking