Skip to content

Commit 7f429e6

Browse files
AleksMatcopybara-github
authored andcommitted
Fix Python 3.14 annotations AttributeError
PiperOrigin-RevId: 883406805
1 parent a59f5ac commit 7f429e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

infra/base-images/base-builder/indexer/manifest_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import dataclasses
2626
import enum
27+
import inspect
2728
import io
2829
import json
2930
import logging
@@ -379,7 +380,7 @@ def validate(self) -> None:
379380
" empty URL. Source map entry: {ref}"
380381
)
381382
# check very simple basic types.
382-
for k, v in self.__annotations__.items():
383+
for k, v in inspect.get_annotations(type(self)).items():
383384
if not isinstance(v, type):
384385
continue
385386
if not isinstance(getattr(self, k), v):

0 commit comments

Comments
 (0)