Skip to content

Commit 4cd5ea6

Browse files
gh-98602: [typing docs] Use quotes for forward reference in TypeVarTuple example (GH-98605)
(cherry picked from commit be0cf82) Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
1 parent abc1a8c commit 4cd5ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ These are not used in annotations. They are building blocks for creating generic
13511351
Shape = TypeVarTuple('Shape')
13521352
class Array(Generic[*Shape]):
13531353
def __getitem__(self, key: tuple[*Shape]) -> float: ...
1354-
def __abs__(self) -> Array[*Shape]: ...
1354+
def __abs__(self) -> "Array[*Shape]": ...
13551355
def get_shape(self) -> tuple[*Shape]: ...
13561356

13571357
Type variable tuples can be happily combined with normal type variables::

0 commit comments

Comments
 (0)