Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
ruff rule FAST002 FastAPI dependency without 'Annotated'
Christian Claussfc5926565490
diff --git a/examples/features/pause_agent.py b/examples/features/pause_agent.pyindex 3b20d5474..ae0308ec5 100644--- a/examples/features/pause_agent.py+++ b/examples/features/pause_agent.py@@ -9,7 +9,6 @@ dotenv.load_dotenv()sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))import threading-import timefrom langchain_openai import ChatOpenAI@@ -98,7 +97,7 @@ async def main():agent_thread.join()break- time.sleep(0.1) # Small delay to prevent CPU spinning+ asyncio.sleep(0.1) # Small delay to prevent CPU spinningif __name__ == '__main__':diff --git a/examples/integrations/slack/slack_api.py b/examples/integrations/slack/slack_api.pyindex 956e2aa66..c99079700 100644--- a/examples/integrations/slack/slack_api.py+++ b/examples/integrations/slack/slack_api.py@@ -1,4 +1,5 @@import logging+from typing import Annotatedfrom dotenv import load_dotenvfrom fastapi import Depends, FastAPI, HTTPException, Request@@ -101,7 +102,7 @@ class SlackBot:@app.post('/slack/events')-async def slack_events(request: Request, slack_bot: SlackBot = Depends()):+async def slack_events(request: Request, slack_bot: Annotated[SlackBot, Depends()]):try:if not slack_bot.signature_verifier.is_valid_request(await request.body(), dict(request.headers)):logger.warning('Request verification failed')diff --git a/pyproject.toml b/pyproject.tomlindex 0bbdc9e7c..80b397a95 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -65,7 +65,7 @@ line-length = 130fix = true[tool.ruff.lint]-select = ["ASYNC", "E", "F", "I", "PLE"]+select = ["ASYNC", "E", "F", "FAST", "I", "PLE"]ignore = ["ASYNC109", "E101", "E402", "E501", "F841", "E731"] # TODO: determine if adding timeouts to all the unbounded async functions is needed / worth-it so we can un-ignore ASYNC109unfixable = ["E101", "E402", "E501", "F841", "E731"]