From 04a44afbff396038fef23e8358d3f94af7a171aa Mon Sep 17 00:00:00 2001 From: Ryan Gunderson Date: Fri, 17 Sep 2021 21:41:06 -0400 Subject: [PATCH] Correct example annotation `self` 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 cff1234b39d39..2d99cdc7bef68 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]):