We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1051d6c commit 320d804Copy full SHA for 320d804
1 file changed
Lib/dataclasses.py
@@ -552,8 +552,10 @@ def __annotate__(format, /):
552
for k in annotation_fields:
553
# gh-142214: The annotation may be missing in unusual dynamic cases.
554
# If so, just skip it.
555
- if k in cls_annotations:
+ try:
556
new_annotations[k] = cls_annotations[k]
557
+ except KeyError:
558
+ pass
559
560
if return_type is not MISSING:
561
if format == Format.STRING:
0 commit comments