@@ -89,7 +89,7 @@ class SchemaValidator:
89
89
* ,
90
90
strict : bool | None = None ,
91
91
from_attributes : bool | None = None ,
92
- context : dict [ str , Any ] | None = None ,
92
+ context : Any | None = None ,
93
93
self_instance : Any | None = None ,
94
94
) -> Any :
95
95
"""
@@ -119,7 +119,7 @@ class SchemaValidator:
119
119
* ,
120
120
strict : bool | None = None ,
121
121
from_attributes : bool | None = None ,
122
- context : dict [ str , Any ] | None = None ,
122
+ context : Any | None = None ,
123
123
self_instance : Any | None = None ,
124
124
) -> bool :
125
125
"""
@@ -136,7 +136,7 @@ class SchemaValidator:
136
136
input : str | bytes | bytearray ,
137
137
* ,
138
138
strict : bool | None = None ,
139
- context : dict [ str , Any ] | None = None ,
139
+ context : Any | None = None ,
140
140
self_instance : Any | None = None ,
141
141
) -> Any :
142
142
"""
@@ -163,9 +163,7 @@ class SchemaValidator:
163
163
Returns:
164
164
The validated Python object.
165
165
"""
166
- def validate_strings (
167
- self , input : _StringInput , * , strict : bool | None = None , context : dict [str , Any ] | None = None
168
- ) -> Any :
166
+ def validate_strings (self , input : _StringInput , * , strict : bool | None = None , context : Any | None = None ) -> Any :
169
167
"""
170
168
Validate a string against the schema and return the validated Python object.
171
169
@@ -194,7 +192,7 @@ class SchemaValidator:
194
192
* ,
195
193
strict : bool | None = None ,
196
194
from_attributes : bool | None = None ,
197
- context : dict [ str , Any ] | None = None ,
195
+ context : Any | None = None ,
198
196
) -> dict [str , Any ] | tuple [dict [str , Any ], dict [str , Any ] | None , set [str ]]:
199
197
"""
200
198
Validate an assignment to a field on a model.
@@ -267,7 +265,7 @@ class SchemaSerializer:
267
265
warnings : bool | Literal ['none' , 'warn' , 'error' ] = True ,
268
266
fallback : Callable [[Any ], Any ] | None = None ,
269
267
serialize_as_any : bool = False ,
270
- context : dict [ str , Any ] | None = None ,
268
+ context : Any | None = None ,
271
269
) -> Any :
272
270
"""
273
271
Serialize/marshal a Python object to a Python object including transforming and filtering data.
@@ -313,7 +311,7 @@ class SchemaSerializer:
313
311
warnings : bool | Literal ['none' , 'warn' , 'error' ] = True ,
314
312
fallback : Callable [[Any ], Any ] | None = None ,
315
313
serialize_as_any : bool = False ,
316
- context : dict [ str , Any ] | None = None ,
314
+ context : Any | None = None ,
317
315
) -> bytes :
318
316
"""
319
317
Serialize a Python object to JSON including transforming and filtering data.
@@ -359,7 +357,7 @@ def to_json(
359
357
serialize_unknown : bool = False ,
360
358
fallback : Callable [[Any ], Any ] | None = None ,
361
359
serialize_as_any : bool = False ,
362
- context : dict [ str , Any ] | None = None ,
360
+ context : Any | None = None ,
363
361
) -> bytes :
364
362
"""
365
363
Serialize a Python object to JSON including transforming and filtering data.
@@ -434,7 +432,7 @@ def to_jsonable_python(
434
432
serialize_unknown : bool = False ,
435
433
fallback : Callable [[Any ], Any ] | None = None ,
436
434
serialize_as_any : bool = False ,
437
- context : dict [ str , Any ] | None = None ,
435
+ context : Any | None = None ,
438
436
) -> Any :
439
437
"""
440
438
Serialize/marshal a Python object to a JSON-serializable Python object including transforming and filtering data.
0 commit comments