We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a9703f commit 08a4409Copy full SHA for 08a4409
csp/impl/struct.py
@@ -149,12 +149,13 @@ def serializer(val, handler):
149
class Struct(_csptypesimpl.PyStruct, metaclass=StructMeta):
150
@classmethod
151
def type_adapter(cls):
152
- # Late import to avoid autogen issues
153
- from pydantic import TypeAdapter
154
-
155
internal_type_adapter = getattr(cls, "_pydantic_type_adapter", None)
156
if internal_type_adapter:
157
return internal_type_adapter
+
+ # Late import to avoid autogen issues
+ from pydantic import TypeAdapter
158
159
cls._pydantic_type_adapter = TypeAdapter(cls)
160
return cls._pydantic_type_adapter
161
0 commit comments