Skip to content

Commit a490405

Browse files
Update Lib/annotationlib.py
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 8754d32 commit a490405

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/annotationlib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ def evaluate(
201201

202202
if resolved is not _sentinel:
203203
if isinstance(resolved, types.LazyImportType):
204-
# We try reifying the lazy object, and assume it's an error
205-
# if format=VALUE was used:
204+
# We try reifying the lazy object. If this fails, we propagate
205+
# the error in the VALUE format and leave the
206+
# ForwardRef unresolved in the FORWARDREF format.
206207
try:
207208
return resolved.resolve()
208209
except Exception:

0 commit comments

Comments
 (0)