From ddc50baacad3aaddfd41d467453cfbdd357d5b83 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Thu, 6 Feb 2020 17:19:43 +0100 Subject: [PATCH] Mention Annotated in get_origin() docstring I forgot to do it in https://github.com/python/cpython/pull/18260. --- Lib/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/typing.py b/Lib/typing.py index 5a7077c27c42a4..8886b08c2ec6fb 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1380,8 +1380,8 @@ def _strip_annotations(t): def get_origin(tp): """Get the unsubscripted version of a type. - This supports generic types, Callable, Tuple, Union, Literal, Final and ClassVar. - Return None for unsupported types. Examples:: + This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar + and Annotated. Return None for unsupported types. Examples:: get_origin(Literal[42]) is Literal get_origin(int) is None