Skip to content

Commit eb4ca16

Browse files
chore: workaround circular import error (#2210)
Co-authored-by: Robert Craigie <[email protected]>
1 parent 51a0005 commit eb4ca16

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

src/cloudflare/types/zero_trust/dlp/profile.py

+51-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from __future__ import annotations
4+
35
from typing import List, Union, Optional
46
from datetime import datetime
57
from typing_extensions import Literal, TypeAlias
68

9+
from ...._compat import PYDANTIC_V2
710
from ...._models import BaseModel
8-
from .profiles.pattern import Pattern
9-
from .context_awareness import ContextAwareness
1011

1112
__all__ = [
1213
"Profile",
@@ -416,3 +417,51 @@ class IntegrationProfile(BaseModel):
416417

417418

418419
Profile: TypeAlias = Union[CustomProfile, PredefinedProfile, IntegrationProfile]
420+
421+
from .profiles.pattern import Pattern
422+
from .context_awareness import ContextAwareness
423+
424+
if PYDANTIC_V2:
425+
CustomProfile.model_rebuild()
426+
CustomProfileEntryCustomEntry.model_rebuild()
427+
CustomProfileEntryPredefinedEntry.model_rebuild()
428+
CustomProfileEntryPredefinedEntryConfidence.model_rebuild()
429+
CustomProfileEntryIntegrationEntry.model_rebuild()
430+
CustomProfileEntryExactDataEntry.model_rebuild()
431+
CustomProfileEntryWordListEntry.model_rebuild()
432+
PredefinedProfile.model_rebuild()
433+
PredefinedProfileEntryCustomEntry.model_rebuild()
434+
PredefinedProfileEntryPredefinedEntry.model_rebuild()
435+
PredefinedProfileEntryPredefinedEntryConfidence.model_rebuild()
436+
PredefinedProfileEntryIntegrationEntry.model_rebuild()
437+
PredefinedProfileEntryExactDataEntry.model_rebuild()
438+
PredefinedProfileEntryWordListEntry.model_rebuild()
439+
IntegrationProfile.model_rebuild()
440+
IntegrationProfileEntryCustomEntry.model_rebuild()
441+
IntegrationProfileEntryPredefinedEntry.model_rebuild()
442+
IntegrationProfileEntryPredefinedEntryConfidence.model_rebuild()
443+
IntegrationProfileEntryIntegrationEntry.model_rebuild()
444+
IntegrationProfileEntryExactDataEntry.model_rebuild()
445+
IntegrationProfileEntryWordListEntry.model_rebuild()
446+
else:
447+
CustomProfile.update_forward_refs() # type: ignore
448+
CustomProfileEntryCustomEntry.update_forward_refs() # type: ignore
449+
CustomProfileEntryPredefinedEntry.update_forward_refs() # type: ignore
450+
CustomProfileEntryPredefinedEntryConfidence.update_forward_refs() # type: ignore
451+
CustomProfileEntryIntegrationEntry.update_forward_refs() # type: ignore
452+
CustomProfileEntryExactDataEntry.update_forward_refs() # type: ignore
453+
CustomProfileEntryWordListEntry.update_forward_refs() # type: ignore
454+
PredefinedProfile.update_forward_refs() # type: ignore
455+
PredefinedProfileEntryCustomEntry.update_forward_refs() # type: ignore
456+
PredefinedProfileEntryPredefinedEntry.update_forward_refs() # type: ignore
457+
PredefinedProfileEntryPredefinedEntryConfidence.update_forward_refs() # type: ignore
458+
PredefinedProfileEntryIntegrationEntry.update_forward_refs() # type: ignore
459+
PredefinedProfileEntryExactDataEntry.update_forward_refs() # type: ignore
460+
PredefinedProfileEntryWordListEntry.update_forward_refs() # type: ignore
461+
IntegrationProfile.update_forward_refs() # type: ignore
462+
IntegrationProfileEntryCustomEntry.update_forward_refs() # type: ignore
463+
IntegrationProfileEntryPredefinedEntry.update_forward_refs() # type: ignore
464+
IntegrationProfileEntryPredefinedEntryConfidence.update_forward_refs() # type: ignore
465+
IntegrationProfileEntryIntegrationEntry.update_forward_refs() # type: ignore
466+
IntegrationProfileEntryExactDataEntry.update_forward_refs() # type: ignore
467+
IntegrationProfileEntryWordListEntry.update_forward_refs() # type: ignore

0 commit comments

Comments
 (0)