From 60d80d8c87581b67243ccc2fd7db98f5b5693554 Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Mon, 22 Jul 2024 23:40:42 -0700 Subject: [PATCH] Modernize code example in docs/guides/writing_stubs.rst Co-authored-by: Sebastian Rittau --- docs/guides/writing_stubs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/writing_stubs.rst b/docs/guides/writing_stubs.rst index 1362bc5f..27c490d1 100644 --- a/docs/guides/writing_stubs.rst +++ b/docs/guides/writing_stubs.rst @@ -522,12 +522,12 @@ with an underscore. Yes:: _T = TypeVar("_T") - _DictList = Dict[str, List[Optional[int]] + _DictList: TypeAlias = dict[str, list[int | None]] No:: T = TypeVar("T") - DictList = Dict[str, List[Optional[int]]] + DictList: TypeAlias = dict[str, list[int | None]] Language Features -----------------