11"""Compatibility layer to make this package usable with Pydantic 1 or 2"""
22
3- from typing import TYPE_CHECKING , Optional
3+ from typing import TYPE_CHECKING , Dict , List , Optional , Tuple
44
55from pydantic .version import VERSION as PYDANTIC_VERSION
66
3030
3131 def ConfigDict (
3232 extra : Literal ["allow" , "ignore" , "forbid" ] = "allow" ,
33- json_schema_extra : Optional [dict [str , Any ]] = None ,
33+ json_schema_extra : Optional [Dict [str , Any ]] = None ,
3434 populate_by_name : bool = True ,
3535 ) -> PydanticConfigDict :
3636 """Stub for pydantic.ConfigDict in Pydantic 2"""
@@ -49,21 +49,21 @@ class RootModel(BaseModel):
4949 JsonSchemaMode = Literal ["validation" , "serialization" ]
5050
5151 def models_json_schema (
52- models : list [ tuple [Type [BaseModel ], JsonSchemaMode ]],
52+ models : List [ Tuple [Type [BaseModel ], JsonSchemaMode ]],
5353 * ,
5454 by_alias : bool = True ,
5555 ref_template : str = "#/$defs/{model}" ,
5656 schema_generator : Optional [type ] = None ,
57- ) -> tuple [ dict , dict [str , Any ]]:
57+ ) -> Tuple [ Dict , Dict [str , Any ]]:
5858 """Stub for pydantic.json_schema.models_json_schema in Pydantic 2"""
5959 ...
6060
6161 def v1_schema (
62- models : list [Type [BaseModel ]],
62+ models : List [Type [BaseModel ]],
6363 * ,
6464 by_alias : bool = True ,
6565 ref_prefix : str = "#/$defs" ,
66- ) -> dict [str , Any ]:
66+ ) -> Dict [str , Any ]:
6767 """Stub for pydantic.schema.schema in Pydantic 1"""
6868 ...
6969
0 commit comments