]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98602: [typing docs] Use quotes for forward reference in TypeVarTuple example...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 25 Oct 2022 15:42:12 +0000 (08:42 -0700)
committerGitHub <noreply@github.com>
Tue, 25 Oct 2022 15:42:12 +0000 (08:42 -0700)
(cherry picked from commit be0cf82ae4e49891dcd5e37012d6f6ce08bc4726)

Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
Doc/library/typing.rst

index 353e7eb1ca87351ab6f6289f32484c9454638fa2..313c67b75c0ce6611258c7f70de83321d6bd658a 100644 (file)
@@ -1351,7 +1351,7 @@ These are not used in annotations. They are building blocks for creating generic
         Shape = TypeVarTuple('Shape')
         class Array(Generic[*Shape]):
             def __getitem__(self, key: tuple[*Shape]) -> float: ...
-            def __abs__(self) -> Array[*Shape]: ...
+            def __abs__(self) -> "Array[*Shape]": ...
             def get_shape(self) -> tuple[*Shape]: ...
 
     Type variable tuples can be happily combined with normal type variables::