Skip to content

Commit b165e42

Browse files
Correct example annotation self (#11133)
Add needed `covariant=True` for example to pass type checking at `page.first_chunk()` as intended.
1 parent b94b04c commit b165e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/more_types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ argument is itself generic:
614614

615615
.. code-block:: python
616616
617-
T = TypeVar('T')
617+
T = TypeVar('T', covariant=True)
618618
S = TypeVar('S')
619619
620620
class Storage(Generic[T]):

0 commit comments

Comments
 (0)