|
7 | 7 | from collections.abc import MutableMapping |
8 | 8 | from enum import Enum |
9 | 9 | from time import sleep |
10 | | -from typing import TYPE_CHECKING, Any, TypedDict, Union |
| 10 | +from typing import TYPE_CHECKING, Any, TypeAlias, TypedDict |
11 | 11 | from urllib.parse import urlencode |
12 | 12 |
|
13 | 13 | import httpx |
14 | 14 | from pydantic import BaseModel, Field |
15 | | -from typing_extensions import TypeAlias |
16 | 15 |
|
17 | 16 | from ..exceptions import ( |
18 | 17 | BranchNotFoundError, |
|
46 | 45 | from ..client import InfrahubClient, InfrahubClientSync, SchemaType, SchemaTypeSync |
47 | 46 | from ..node import InfrahubNode, InfrahubNodeSync |
48 | 47 |
|
49 | | - InfrahubNodeTypes = Union[InfrahubNode, InfrahubNodeSync] |
| 48 | + InfrahubNodeTypes: TypeAlias = InfrahubNode | InfrahubNodeSync |
50 | 49 |
|
51 | 50 |
|
52 | 51 | __all__ = [ |
@@ -84,11 +83,11 @@ class EnumMutation(str, Enum): |
84 | 83 | remove = "SchemaEnumRemove" |
85 | 84 |
|
86 | 85 |
|
87 | | -MainSchemaTypes: TypeAlias = Union[NodeSchema, GenericSchema] |
88 | | -MainSchemaTypesAPI: TypeAlias = Union[NodeSchemaAPI, GenericSchemaAPI, ProfileSchemaAPI, TemplateSchemaAPI] |
89 | | -MainSchemaTypesAll: TypeAlias = Union[ |
90 | | - NodeSchema, GenericSchema, NodeSchemaAPI, GenericSchemaAPI, ProfileSchemaAPI, TemplateSchemaAPI |
91 | | -] |
| 86 | +MainSchemaTypes: TypeAlias = NodeSchema | GenericSchema |
| 87 | +MainSchemaTypesAPI: TypeAlias = NodeSchemaAPI | GenericSchemaAPI | ProfileSchemaAPI | TemplateSchemaAPI |
| 88 | +MainSchemaTypesAll: TypeAlias = ( |
| 89 | + NodeSchema | GenericSchema | NodeSchemaAPI | GenericSchemaAPI | ProfileSchemaAPI | TemplateSchemaAPI |
| 90 | +) |
92 | 91 |
|
93 | 92 |
|
94 | 93 | class SchemaWarningType(Enum): |
|
0 commit comments