-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
Description
The typing
module docs cover using Annotated.__metadata__
to retrieve the annotations, but they do not currently cover the use of Annotated.__origin__
to retrieve the underlying type hint that is being annotated.
>>> from typing import Annotated
>>> Annotated[int, ""].__metadata__
('',)
>>> Annotated[int, ""].__origin__
<class 'int'>