|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from . import release, deployment, config_type, config_schema, config_instance, deployment_validate_response |
6 | | -from .. import _compat |
7 | 5 | from .device import Device as Device |
8 | 6 | from .release import Release as Release |
9 | 7 | from .deployment import Deployment as Deployment |
10 | 8 | from .config_type import ConfigType as ConfigType |
11 | 9 | from .config_schema import ConfigSchema as ConfigSchema |
12 | 10 | from .paginated_list import PaginatedList as PaginatedList |
13 | 11 | from .config_instance import ConfigInstance as ConfigInstance |
14 | | -from .config_schema_list import ConfigSchemaList as ConfigSchemaList |
15 | 12 | from .device_list_params import DeviceListParams as DeviceListParams |
16 | 13 | from .release_list_params import ReleaseListParams as ReleaseListParams |
17 | 14 | from .device_create_params import DeviceCreateParams as DeviceCreateParams |
18 | 15 | from .device_list_response import DeviceListResponse as DeviceListResponse |
19 | 16 | from .device_update_params import DeviceUpdateParams as DeviceUpdateParams |
20 | | -from .unwrap_webhook_event import UnwrapWebhookEvent as UnwrapWebhookEvent |
21 | 17 | from .release_list_response import ReleaseListResponse as ReleaseListResponse |
22 | 18 | from .deployment_list_params import DeploymentListParams as DeploymentListParams |
23 | 19 | from .device_delete_response import DeviceDeleteResponse as DeviceDeleteResponse |
|
30 | 26 | from .deployment_validate_response import DeploymentValidateResponse as DeploymentValidateResponse |
31 | 27 | from .config_instance_list_response import ConfigInstanceListResponse as ConfigInstanceListResponse |
32 | 28 | from .config_instance_retrieve_params import ConfigInstanceRetrieveParams as ConfigInstanceRetrieveParams |
33 | | -from .deployment_validate_webhook_event import DeploymentValidateWebhookEvent as DeploymentValidateWebhookEvent |
34 | 29 | from .device_create_activation_token_params import ( |
35 | 30 | DeviceCreateActivationTokenParams as DeviceCreateActivationTokenParams, |
36 | 31 | ) |
37 | 32 | from .device_create_activation_token_response import ( |
38 | 33 | DeviceCreateActivationTokenResponse as DeviceCreateActivationTokenResponse, |
39 | 34 | ) |
40 | | - |
41 | | -# Rebuild cyclical models only after all modules are imported. |
42 | | -# This ensures that, when building the deferred (due to cyclical references) model schema, |
43 | | -# Pydantic can resolve the necessary references. |
44 | | -# See: https://github.com/pydantic/pydantic/issues/11250 for more context. |
45 | | -if _compat.PYDANTIC_V1: |
46 | | - config_instance.ConfigInstance.update_forward_refs() # type: ignore |
47 | | - config_schema.ConfigSchema.update_forward_refs() # type: ignore |
48 | | - config_type.ConfigType.update_forward_refs() # type: ignore |
49 | | - deployment.Deployment.update_forward_refs() # type: ignore |
50 | | - deployment_validate_response.DeploymentValidateResponse.update_forward_refs() # type: ignore |
51 | | - release.Release.update_forward_refs() # type: ignore |
52 | | -else: |
53 | | - config_instance.ConfigInstance.model_rebuild(_parent_namespace_depth=0) |
54 | | - config_schema.ConfigSchema.model_rebuild(_parent_namespace_depth=0) |
55 | | - config_type.ConfigType.model_rebuild(_parent_namespace_depth=0) |
56 | | - deployment.Deployment.model_rebuild(_parent_namespace_depth=0) |
57 | | - deployment_validate_response.DeploymentValidateResponse.model_rebuild(_parent_namespace_depth=0) |
58 | | - release.Release.model_rebuild(_parent_namespace_depth=0) |
0 commit comments