mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-119180: Make the FORWARDREF format work with more kinds of runtime errors (#133407)
This commit is contained in:
parent
4c56563f7a
commit
4e498d1e8b
3 changed files with 19 additions and 1 deletions
|
@ -868,7 +868,7 @@ def get_annotations(
|
|||
# For FORWARDREF, we use __annotations__ if it exists
|
||||
try:
|
||||
ann = _get_dunder_annotations(obj)
|
||||
except NameError:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
if ann is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue