|
23 | 23 | ) |
24 | 24 | from idf_component_tools.errors import FatalError, NoSuchProfile |
25 | 25 | from idf_component_tools.utils import ( |
26 | | - Annotated, |
27 | 26 | BaseModel, |
28 | | - Literal, |
29 | 27 | UrlField, |
30 | 28 | UrlOrFileField, |
31 | 29 | default_or_str_or_list_or_none_discriminator, |
|
37 | 35 | from .build_system_tools import get_idf_version |
38 | 36 | from .environment import ComponentManagerSettings |
39 | 37 |
|
40 | | -RegistryUrlField = Annotated[ |
| 38 | +RegistryUrlField = t.Annotated[ |
41 | 39 | t.Union[ |
42 | | - Annotated[Literal['default'], Tag('__default__')], |
43 | | - Annotated[UrlField, Tag('__str__')], |
44 | | - Annotated[None, Tag('__none__')], |
| 40 | + t.Annotated[t.Literal['default'], Tag('__default__')], |
| 41 | + t.Annotated[UrlField, Tag('__str__')], |
| 42 | + t.Annotated[None, Tag('__none__')], |
45 | 43 | ], |
46 | 44 | Discriminator( |
47 | 45 | default_or_str_or_none_discriminator, |
48 | 46 | ), |
49 | 47 | ] |
50 | 48 |
|
51 | | -StorageUrlField = Annotated[ |
| 49 | +StorageUrlField = t.Annotated[ |
52 | 50 | t.Union[ |
53 | | - Annotated[Literal['default'], Tag('__default__')], |
54 | | - Annotated[UrlOrFileField, Tag('__str__')], |
55 | | - Annotated[t.List[t.Union[Literal['default'], UrlOrFileField]], Tag('__list__')], |
56 | | - Annotated[None, Tag('__none__')], |
| 51 | + t.Annotated[t.Literal['default'], Tag('__default__')], |
| 52 | + t.Annotated[UrlOrFileField, Tag('__str__')], |
| 53 | + t.Annotated[t.List[t.Union[t.Literal['default'], UrlOrFileField]], Tag('__list__')], |
| 54 | + t.Annotated[None, Tag('__none__')], |
57 | 55 | ], |
58 | 56 | Discriminator( |
59 | 57 | default_or_str_or_list_or_none_discriminator, |
60 | 58 | ), |
61 | 59 | ] |
62 | | -LocalStorageUrlField = Annotated[ |
| 60 | +LocalStorageUrlField = t.Annotated[ |
63 | 61 | t.Union[ |
64 | | - Annotated[UrlOrFileField, Tag('__str__')], |
65 | | - Annotated[t.List[UrlOrFileField], Tag('__list__')], |
66 | | - Annotated[None, Tag('__none__')], |
| 62 | + t.Annotated[UrlOrFileField, Tag('__str__')], |
| 63 | + t.Annotated[t.List[UrlOrFileField], Tag('__list__')], |
| 64 | + t.Annotated[None, Tag('__none__')], |
67 | 65 | ], |
68 | 66 | Discriminator( |
69 | 67 | str_or_list_or_none_discriminator, |
|
0 commit comments