File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,17 @@ class Metadata(BaseModel):
3232
3333 url : Optional [str ] = None
3434
35- __pydantic_extra__ : Dict [str , object ] = FieldInfo (init = False ) # pyright: ignore[reportIncompatibleVariableOverride]
3635 if TYPE_CHECKING :
36+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
37+ # value to this field, so for compatibility we avoid doing it at runtime.
38+ __pydantic_extra__ : Dict [str , object ] = FieldInfo (init = False ) # pyright: ignore[reportIncompatibleVariableOverride]
39+
3740 # Stub to indicate that arbitrary properties are accepted.
3841 # To access properties that are not valid identifiers you can use `getattr`, e.g.
3942 # `getattr(obj, '$type')`
4043 def __getattr__ (self , attr : str ) -> object : ...
44+ else :
45+ __pydantic_extra__ : Dict [str , object ]
4146
4247
4348class Memory (BaseModel ):
You can’t perform that action at this time.
0 commit comments