File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ def cleanup_handler(sig, frame):
280
280
def schedule_cleanup ():
281
281
task = asyncio .create_task (self ._async_cleanup ())
282
282
# Shield the task to prevent it from being cancelled
283
- shielded = asyncio .shield (task )
283
+ asyncio .shield (task )
284
284
# We don't need to await here since we're in call_soon_threadsafe
285
285
286
286
loop .call_soon_threadsafe (schedule_cleanup )
Original file line number Diff line number Diff line change @@ -840,7 +840,7 @@ def transform_url_strings_to_ids(schema):
840
840
return transform_model (schema )
841
841
842
842
843
- def transform_model (model_cls , path = [] ):
843
+ def transform_model (model_cls , path = None ):
844
844
"""
845
845
Recursively transforms a Pydantic model by replacing URL fields with numeric fields.
846
846
@@ -851,6 +851,9 @@ def transform_model(model_cls, path=[]):
851
851
Returns:
852
852
Tuple of (transformed_model_cls, url_paths)
853
853
"""
854
+ if path is None :
855
+ path = []
856
+
854
857
# Get model fields based on Pydantic version
855
858
try :
856
859
# Pydantic V2 approach
You can’t perform that action at this time.
0 commit comments