Skip to content

Commit 93a9011

Browse files
formatting
1 parent 8ca7751 commit 93a9011

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

stagehand/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def cleanup_handler(sig, frame):
280280
def schedule_cleanup():
281281
task = asyncio.create_task(self._async_cleanup())
282282
# Shield the task to prevent it from being cancelled
283-
shielded = asyncio.shield(task)
283+
asyncio.shield(task)
284284
# We don't need to await here since we're in call_soon_threadsafe
285285

286286
loop.call_soon_threadsafe(schedule_cleanup)

stagehand/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def transform_url_strings_to_ids(schema):
840840
return transform_model(schema)
841841

842842

843-
def transform_model(model_cls, path=[]):
843+
def transform_model(model_cls, path=None):
844844
"""
845845
Recursively transforms a Pydantic model by replacing URL fields with numeric fields.
846846
@@ -851,6 +851,9 @@ def transform_model(model_cls, path=[]):
851851
Returns:
852852
Tuple of (transformed_model_cls, url_paths)
853853
"""
854+
if path is None:
855+
path = []
856+
854857
# Get model fields based on Pydantic version
855858
try:
856859
# Pydantic V2 approach

0 commit comments

Comments
 (0)