Skip to content

Commit 8896a25

Browse files
committed
gh-119180: Document the format parameter in typing.get_type_hints()
1 parent 66e1399 commit 8896a25

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/library/typing.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3328,7 +3328,7 @@ Functions and decorators
33283328
Introspection helpers
33293329
---------------------
33303330

3331-
.. function:: get_type_hints(obj, globalns=None, localns=None, include_extras=False)
3331+
.. function:: get_type_hints(obj, globalns=None, localns=None, include_extras=False, *, format=Format.VALUE)
33323332

33333333
Return a dictionary containing type hints for a function, method, module
33343334
or class object.
@@ -3381,6 +3381,10 @@ Introspection helpers
33813381
if a default value equal to ``None`` was set.
33823382
Now the annotation is returned unchanged.
33833383

3384+
.. versionchanged:: 3.14
3385+
Added the ``format`` parameter. See the documentation on
3386+
:func:`annotationlib.get_annotations` for more information.
3387+
33843388
.. function:: get_origin(tp)
33853389

33863390
Get the unsubscripted version of a type: for a typing object of the form

0 commit comments

Comments
 (0)