Skip to content

Commit 29e34e2

Browse files
formatting
1 parent 55800e4 commit 29e34e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stagehand/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, stagehand_instance):
4545

4646
async def _ensure_page_stability(self):
4747
"""Wait for any pending page switches to complete"""
48-
if hasattr(self._stagehand, '_page_switch_lock'):
48+
if hasattr(self._stagehand, "_page_switch_lock"):
4949
async with self._stagehand._page_switch_lock:
5050
pass # Just wait for any ongoing switches
5151

@@ -64,9 +64,11 @@ def __getattr__(self, name):
6464
# For async operations, make them wait for stability
6565
attr = getattr(active_page, name)
6666
if callable(attr) and asyncio.iscoroutinefunction(attr):
67+
6768
async def wrapped(*args, **kwargs):
6869
await self._ensure_page_stability()
6970
return await attr(*args, **kwargs)
71+
7072
return wrapped
7173
return attr
7274

0 commit comments

Comments
 (0)