[Python-checkins] gh-98602: [typing docs] Use quotes for forward reference in TypeVarTuple example (GH-98605)

miss-islington webhook-mailer at python.org
Tue Oct 25 11:42:18 EDT 2022


https://github.com/python/cpython/commit/4cd5ea62acae3de3bb33734bc5103d6454a97629
commit: 4cd5ea62acae3de3bb33734bc5103d6454a97629
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-25T08:42:12-07:00
summary:

gh-98602: [typing docs] Use quotes for forward reference in TypeVarTuple example (GH-98605)

(cherry picked from commit be0cf82ae4e49891dcd5e37012d6f6ce08bc4726)

Co-authored-by: Eclips4 <80244920+Eclips4 at users.noreply.github.com>

files:
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 353e7eb1ca87..313c67b75c0c 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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::



More information about the Python-checkins mailing list