From b165e42ceed949a89cb28f5b5d0c194af1a0298f Mon Sep 17 00:00:00 2001 From: ryan-gunderson <73042169+ryan-gunderson@users.noreply.github.com> Date: Sun, 19 Sep 2021 18:55:09 -0400 Subject: [PATCH] Correct example annotation `self` (#11133) Add needed `covariant=True` for example to pass type checking at `page.first_chunk()` as intended. --- docs/source/more_types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/more_types.rst b/docs/source/more_types.rst index cff1234b39d3..2d99cdc7bef6 100644 --- a/docs/source/more_types.rst +++ b/docs/source/more_types.rst @@ -614,7 +614,7 @@ argument is itself generic: .. code-block:: python - T = TypeVar('T') + T = TypeVar('T', covariant=True) S = TypeVar('S') class Storage(Generic[T]):