@@ -769,7 +769,7 @@ Functions
769769
770770 .. versionadded :: 4.2.0
771771
772- .. function :: evaluate_forward_ref(forward_ref, *, owner=None, globals=None, locals=None, type_params=None, format=Format.VALUE )
772+ .. function :: evaluate_forward_ref(forward_ref, *, owner=None, globals=None, locals=None, type_params=None, format=None )
773773
774774 Evaluate an :py:class: `typing.ForwardRef ` as a :py:term: `type hint `.
775775
@@ -796,7 +796,7 @@ Functions
796796 This parameter must be provided (though it may be an empty tuple) if *owner *
797797 is not given and the forward reference does not already have an owner set.
798798 *format * specifies the format of the annotation and is a member of
799- the :class: `Format ` enum.
799+ the :class: `Format ` enum, defaulting to :attr: ` Format.VALUE ` .
800800
801801 .. versionadded :: 4.13.0
802802
@@ -952,9 +952,19 @@ Enums
952952 for the annotations. This format is identical to the return value for
953953 the function under earlier versions of Python.
954954
955+ .. attribute :: VALUE_WITH_FAKE_GLOBALS
956+
957+ Equal to 2. Special value used to signal that an annotate function is being
958+ evaluated in a special environment with fake globals. When passed this
959+ value, annotate functions should either return the same value as for
960+ the :attr: `Format.VALUE ` format, or raise :exc: `NotImplementedError `
961+ to signal that they do not support execution in this environment.
962+ This format is only used internally and should not be passed to
963+ the functions in this module.
964+
955965 .. attribute :: FORWARDREF
956966
957- Equal to 2 . When :pep: `649 ` is implemented, this format will attempt to return the
967+ Equal to 3 . When :pep: `649 ` is implemented, this format will attempt to return the
958968 conventional Python values for the annotations. However, if it encounters
959969 an undefined name, it dynamically creates a proxy object (a ForwardRef)
960970 that substitutes for that value in the expression.
@@ -964,7 +974,7 @@ Enums
964974
965975 .. attribute :: STRING
966976
967- Equal to 3 . When :pep: `649 ` is implemented, this format will produce an annotation
977+ Equal to 4 . When :pep: `649 ` is implemented, this format will produce an annotation
968978 dictionary where the values have been replaced by strings containing
969979 an approximation of the original source code for the annotation expressions.
970980
0 commit comments