Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

run pre-commit --all-files

dha-aaced8f482eb5b
diff --git a/examples/custom-functions/file_upload.py b/examples/custom-functions/file_upload.py
index 827c0b637..d79f33cd5 100644
--- a/examples/custom-functions/file_upload.py
+++ b/examples/custom-functions/file_upload.py
@@ -70,7 +70,7 @@ async def read_file(path: str, available_file_paths: list[str]):
if path not in available_file_paths:
return ActionResult(error=f'File path {path} is not available')
- async with (await anyio.open_file(path, 'r')) as f:
+ async with await anyio.open_file(path, 'r') as f:
content = await f.read()
msg = f'File content: {content}'
logger.info(msg)