Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/@python2/_typeshed/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ _T = TypeVar("_T")
_T_co = TypeVar("_T_co", covariant=True)
_T_contra = TypeVar("_T_contra", contravariant=True)

# Use for "self" annotations:
# def __enter__(self: Self) -> Self: ...
Self = TypeVar("Self") # noqa Y001

class IdentityFunction(Protocol):
def __call__(self, __x: _T) -> _T: ...

Expand Down
4 changes: 4 additions & 0 deletions stdlib/_typeshed/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ _T = TypeVar("_T")
_T_co = TypeVar("_T_co", covariant=True)
_T_contra = TypeVar("_T_contra", contravariant=True)

# Use for "self" annotations:
# def __enter__(self: Self) -> Self: ...
Self = TypeVar("Self") # noqa Y001

# stable
class IdentityFunction(Protocol):
def __call__(self, __x: _T) -> _T: ...
Expand Down