Skip to content

fix: resolve all ruff lint and format errors#7058

Merged
Hundao merged 1 commit into
aden-hive:mainfrom
Hundao:fix/ruff-lint-errors
Apr 16, 2026
Merged

fix: resolve all ruff lint and format errors#7058
Hundao merged 1 commit into
aden-hive:mainfrom
Hundao:fix/ruff-lint-errors

Conversation

@Hundao

@Hundao Hundao commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix all ruff lint errors (155) and format issues (343 files) across the codebase to restore the Lint Python CI check on main.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Related Issues

Partial fix for #7057

Changes Made

  • Auto-fixed 70 lint errors (import sorting, aliased errors, datetime.UTC)
  • Fixed 85 remaining errors manually:
    • E501: wrapped long lines in queen_profiles, catalog, routes_credentials
    • F821: added missing TYPE_CHECKING imports (AgentHost, ToolRegistry, HookContext, HookResult); added runtime imports where constructors are called
    • F811: removed duplicate method definitions in queen_lifecycle_tools
    • F841/B007: removed unused variables in discovery.py
    • W291: removed trailing whitespace in queen nodes
    • E402: moved import to top of queen_memory_v2.py
    • Fixed AgentRuntime -> AgentHost in example template type annotations
  • Reformatted 343 files with ruff format

Testing

  • Lint passes (uv run ruff check . -> All checks passed!)
  • Format passes (uv run ruff format --check . -> 847 files already formatted)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings

- Auto-fixed 70 lint errors (import sorting, aliased errors, datetime.UTC)
- Fixed 85 remaining errors manually:
  - E501: wrapped long lines in queen_profiles, catalog, routes_credentials
  - F821: added missing TYPE_CHECKING imports for AgentHost, ToolRegistry,
    HookContext, HookResult; added runtime imports where needed
  - F811: removed duplicate method definitions in queen_lifecycle_tools
  - F841/B007: removed unused variables in discovery.py
  - W291: removed trailing whitespace in queen nodes
  - E402: moved import to top of queen_memory_v2.py
  - Fixed AgentRuntime -> AgentHost in example template type annotations
- Reformatted 343 files with ruff format
@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 42447d57-b30d-41bc-ab29-7fd550108bd8

📥 Commits

Reviewing files that changed from the base of the PR and between 4fdbc43 and 9de56ed.

📒 Files selected for processing (300)
  • .claude/skills/browser-edge-cases/scripts/test_02_twitter_scroll.py
  • .claude/skills/browser-edge-cases/scripts/test_06_shadow_dom.py
  • .claude/skills/browser-edge-cases/scripts/test_08_autocomplete.py
  • .claude/skills/browser-edge-cases/scripts/test_10_huge_dom.py
  • .claude/skills/browser-edge-cases/scripts/test_15_screenshot.py
  • .claude/skills/browser-edge-cases/scripts/test_case.py
  • core/antigravity_auth.py
  • core/framework/agent_loop/agent_loop.py
  • core/framework/agent_loop/conversation.py
  • core/framework/agent_loop/internals/compaction.py
  • core/framework/agent_loop/internals/cursor_persistence.py
  • core/framework/agent_loop/internals/judge_pipeline.py
  • core/framework/agent_loop/internals/synthetic_tools.py
  • core/framework/agent_loop/internals/tool_result_handler.py
  • core/framework/agent_loop/internals/types.py
  • core/framework/agent_loop/prompting.py
  • core/framework/agent_loop/types.py
  • core/framework/agents/credential_tester/agent.py
  • core/framework/agents/discovery.py
  • core/framework/agents/queen/agent.py
  • core/framework/agents/queen/nodes/__init__.py
  • core/framework/agents/queen/queen_memory_v2.py
  • core/framework/agents/queen/queen_profiles.py
  • core/framework/agents/queen/reflection_agent.py
  • core/framework/config.py
  • core/framework/credentials/aden/client.py
  • core/framework/credentials/aden/provider.py
  • core/framework/credentials/aden/storage.py
  • core/framework/credentials/aden/tests/test_aden_sync.py
  • core/framework/credentials/oauth2/base_provider.py
  • core/framework/credentials/oauth2/lifecycle.py
  • core/framework/credentials/oauth2/zoho_provider.py
  • core/framework/credentials/setup.py
  • core/framework/credentials/storage.py
  • core/framework/credentials/store.py
  • core/framework/credentials/template.py
  • core/framework/credentials/tests/test_credential_store.py
  • core/framework/credentials/validation.py
  • core/framework/host/agent_host.py
  • core/framework/host/colony_runtime.py
  • core/framework/host/event_bus.py
  • core/framework/host/execution_manager.py
  • core/framework/host/shared_state.py
  • core/framework/host/stream_runtime.py
  • core/framework/host/webhook_server.py
  • core/framework/host/worker.py
  • core/framework/llm/anthropic.py
  • core/framework/llm/antigravity.py
  • core/framework/llm/litellm.py
  • core/framework/llm/model_catalog.py
  • core/framework/loader/agent_loader.py
  • core/framework/loader/cli.py
  • core/framework/loader/mcp_client.py
  • core/framework/loader/mcp_connection_manager.py
  • core/framework/loader/mcp_errors.py
  • core/framework/loader/mcp_registry.py
  • core/framework/loader/mcp_registry_cli.py
  • core/framework/loader/preload_validation.py
  • core/framework/loader/tool_registry.py
  • core/framework/orchestrator/checkpoint_config.py
  • core/framework/orchestrator/context.py
  • core/framework/orchestrator/context_handoff.py
  • core/framework/orchestrator/edge.py
  • core/framework/orchestrator/goal.py
  • core/framework/orchestrator/node.py
  • core/framework/orchestrator/node_worker.py
  • core/framework/orchestrator/orchestrator.py
  • core/framework/orchestrator/prompt_composer.py
  • core/framework/orchestrator/prompting.py
  • core/framework/orchestrator/safe_eval.py
  • core/framework/orchestrator/validator.py
  • core/framework/pipeline/stages/cost_guard.py
  • core/framework/pipeline/stages/input_validation.py
  • core/framework/pipeline/stages/rate_limit.py
  • core/framework/schemas/goal.py
  • core/framework/schemas/session_state.py
  • core/framework/server/app.py
  • core/framework/server/queen_orchestrator.py
  • core/framework/server/routes_config.py
  • core/framework/server/routes_credentials.py
  • core/framework/server/routes_events.py
  • core/framework/server/routes_execution.py
  • core/framework/server/routes_queens.py
  • core/framework/server/routes_sessions.py
  • core/framework/server/routes_workers.py
  • core/framework/server/session_manager.py
  • core/framework/server/tests/test_api.py
  • core/framework/skills/catalog.py
  • core/framework/skills/cli.py
  • core/framework/skills/defaults.py
  • core/framework/skills/registry.py
  • core/framework/skills/skill_errors.py
  • core/framework/skills/tool_gating.py
  • core/framework/skills/trust.py
  • core/framework/skills/validator.py
  • core/framework/storage/checkpoint_store.py
  • core/framework/testing/approval_cli.py
  • core/framework/testing/approval_types.py
  • core/framework/testing/categorizer.py
  • core/framework/testing/debug_tool.py
  • core/framework/testing/test_case.py
  • core/framework/testing/test_result.py
  • core/framework/testing/test_storage.py
  • core/framework/tools/flowchart_utils.py
  • core/framework/tools/queen_lifecycle_tools.py
  • core/framework/tools/worker_monitoring_tools.py
  • core/framework/tracker/decision_tracker.py
  • core/framework/tracker/runtime_log_store.py
  • core/tests/debug_codex_stream.py
  • core/tests/debug_codex_verbose.py
  • core/tests/test_antigravity_eventloop.py
  • core/tests/test_codex_eventloop.py
  • core/tests/test_colony_fork_flow.py
  • core/tests/test_colony_fork_live.py
  • core/tests/test_colony_runtime_overseer.py
  • core/tests/test_context_handoff.py
  • core/tests/test_create_colony_tool.py
  • core/tests/test_default_skills.py
  • core/tests/test_event_bus.py
  • core/tests/test_event_loop_node.py
  • core/tests/test_event_type_extension.py
  • core/tests/test_flowchart_utils.py
  • core/tests/test_hallucination_detection.py
  • core/tests/test_litellm_provider.py
  • core/tests/test_litellm_streaming.py
  • core/tests/test_llm_judge.py
  • core/tests/test_mcp_registry.py
  • core/tests/test_mcp_registry_cli.py
  • core/tests/test_mcp_registry_loader.py
  • core/tests/test_node_conversation.py
  • core/tests/test_phase_compaction.py
  • core/tests/test_queen_memory.py
  • core/tests/test_queen_nodes_prompt.py
  • core/tests/test_run_parallel_workers_tool.py
  • core/tests/test_runtime_logger.py
  • core/tests/test_skill_cli_commands.py
  • core/tests/test_skill_integration.py
  • core/tests/test_skill_trust.py
  • core/tests/test_subagent.py
  • core/tests/test_tool_context_propagation.py
  • core/tests/test_tool_registry.py
  • core/tests/test_two_llm_calls.py
  • examples/templates/competitive_intel_agent/__main__.py
  • examples/templates/competitive_intel_agent/agent.py
  • examples/templates/deep_research_agent/agent.py
  • examples/templates/email_inbox_management/__main__.py
  • examples/templates/email_inbox_management/agent.py
  • examples/templates/email_inbox_management/tools.py
  • examples/templates/email_reply_agent/__main__.py
  • examples/templates/email_reply_agent/agent.py
  • examples/templates/email_reply_agent/config.py
  • examples/templates/job_hunter/agent.py
  • examples/templates/job_hunter/nodes/__init__.py
  • examples/templates/local_business_extractor/agent.py
  • examples/templates/local_business_extractor/config.py
  • examples/templates/meeting_scheduler/__main__.py
  • examples/templates/meeting_scheduler/agent.py
  • examples/templates/sdr_agent/__main__.py
  • examples/templates/sdr_agent/agent.py
  • examples/templates/sdr_agent/tools.py
  • examples/templates/twitter_news_agent/agent.py
  • examples/templates/twitter_news_agent/config.py
  • examples/templates/vulnerability_assessment/agent.py
  • examples/templates/vulnerability_assessment/nodes/__init__.py
  • linkedin_script.py
  • scripts/check_llm_key.py
  • scripts/debug_queen_prompt.py
  • scripts/llm_debug_log_visualizer.py
  • tools/coder_tools_server.py
  • tools/create_aden_testdb.py
  • tools/files_server.py
  • tools/linkedin_browser_test.py
  • tools/manual_browser_complex_test.py
  • tools/mcp_server.py
  • tools/payroll_analysis.py
  • tools/query_avg_salary.py
  • tools/schema_discovery.py
  • tools/src/aden_tools/credentials/cloudflare.py
  • tools/src/aden_tools/credentials/docker_hub.py
  • tools/src/aden_tools/credentials/email.py
  • tools/src/aden_tools/credentials/health_check.py
  • tools/src/aden_tools/credentials/huggingface.py
  • tools/src/aden_tools/credentials/intercom.py
  • tools/src/aden_tools/credentials/pipedrive.py
  • tools/src/aden_tools/credentials/plaid.py
  • tools/src/aden_tools/credentials/shell_config.py
  • tools/src/aden_tools/credentials/store_adapter.py
  • tools/src/aden_tools/file_ops.py
  • tools/src/aden_tools/file_state_cache.py
  • tools/src/aden_tools/hashline.py
  • tools/src/aden_tools/tools/__init__.py
  • tools/src/aden_tools/tools/apify_tool/apify_tool.py
  • tools/src/aden_tools/tools/apollo_tool/apollo_tool.py
  • tools/src/aden_tools/tools/asana_tool/asana_tool.py
  • tools/src/aden_tools/tools/attio_tool/attio_tool.py
  • tools/src/aden_tools/tools/aws_s3_tool/aws_s3_tool.py
  • tools/src/aden_tools/tools/azure_sql_tool/azure_sql_tool.py
  • tools/src/aden_tools/tools/bigquery_tool/bigquery_tool.py
  • tools/src/aden_tools/tools/brevo_tool/brevo_tool.py
  • tools/src/aden_tools/tools/calcom_tool/calcom_tool.py
  • tools/src/aden_tools/tools/calendar_tool/calendar_tool.py
  • tools/src/aden_tools/tools/cloudflare_tool/cloudflare_tool.py
  • tools/src/aden_tools/tools/cloudinary_tool/cloudinary_tool.py
  • tools/src/aden_tools/tools/csv_tool/csv_tool.py
  • tools/src/aden_tools/tools/databricks_tool/databricks_mcp_tool.py
  • tools/src/aden_tools/tools/databricks_tool/databricks_tool.py
  • tools/src/aden_tools/tools/discord_tool/discord_tool.py
  • tools/src/aden_tools/tools/dns_security_scanner/dns_security_scanner.py
  • tools/src/aden_tools/tools/docker_hub_tool/docker_hub_tool.py
  • tools/src/aden_tools/tools/email_tool/email_tool.py
  • tools/src/aden_tools/tools/exa_search_tool/exa_search_tool.py
  • tools/src/aden_tools/tools/excel_tool/excel_tool.py
  • tools/src/aden_tools/tools/file_system_toolkits/data_tools/data_tools.py
  • tools/src/aden_tools/tools/file_system_toolkits/execute_command_tool/background_jobs.py
  • tools/src/aden_tools/tools/file_system_toolkits/execute_command_tool/execute_command_tool.py
  • tools/src/aden_tools/tools/file_system_toolkits/hashline_edit/hashline_edit.py
  • tools/src/aden_tools/tools/file_system_toolkits/security.py
  • tools/src/aden_tools/tools/github_tool/github_tool.py
  • tools/src/aden_tools/tools/gitlab_tool/gitlab_tool.py
  • tools/src/aden_tools/tools/gmail_tool/gmail_tool.py
  • tools/src/aden_tools/tools/google_analytics_tool/google_analytics_tool.py
  • tools/src/aden_tools/tools/google_docs_tool/google_docs_tool.py
  • tools/src/aden_tools/tools/google_docs_tool/tests/test_google_docs_tool.py
  • tools/src/aden_tools/tools/google_search_console_tool/google_search_console_tool.py
  • tools/src/aden_tools/tools/google_sheets_tool/google_sheets_tool.py
  • tools/src/aden_tools/tools/google_sheets_tool/tests/test_google_sheets_integration.py
  • tools/src/aden_tools/tools/google_sheets_tool/tests/test_google_sheets_tool.py
  • tools/src/aden_tools/tools/greenhouse_tool/greenhouse_tool.py
  • tools/src/aden_tools/tools/http_headers_scanner/http_headers_scanner.py
  • tools/src/aden_tools/tools/hubspot_tool/hubspot_tool.py
  • tools/src/aden_tools/tools/hubspot_tool/tests/test_hubspot_tool.py
  • tools/src/aden_tools/tools/huggingface_tool/huggingface_tool.py
  • tools/src/aden_tools/tools/intercom_tool/intercom_tool.py
  • tools/src/aden_tools/tools/intercom_tool/tests/test_intercom_tool.py
  • tools/src/aden_tools/tools/jira_tool/jira_tool.py
  • tools/src/aden_tools/tools/linear_tool/linear_tool.py
  • tools/src/aden_tools/tools/linear_tool/tests/test_linear_tool.py
  • tools/src/aden_tools/tools/mattermost_tool/mattermost_tool.py
  • tools/src/aden_tools/tools/microsoft_graph_tool/microsoft_graph_tool.py
  • tools/src/aden_tools/tools/mssql_tool/mssql_tool.py
  • tools/src/aden_tools/tools/n8n_tool/n8n_tool.py
  • tools/src/aden_tools/tools/notion_tool/notion_tool.py
  • tools/src/aden_tools/tools/pdf_read_tool/pdf_read_tool.py
  • tools/src/aden_tools/tools/plaid_tool/plaid_tool.py
  • tools/src/aden_tools/tools/port_scanner/port_scanner.py
  • tools/src/aden_tools/tools/postgres_tool/postgres_tool.py
  • tools/src/aden_tools/tools/pushover_tool/pushover_tool.py
  • tools/src/aden_tools/tools/pushover_tool/tests/test_pushover_tool.py
  • tools/src/aden_tools/tools/quickbooks_tool/quickbooks_tool.py
  • tools/src/aden_tools/tools/salesforce_tool/salesforce_tool.py
  • tools/src/aden_tools/tools/serpapi_tool/serpapi_tool.py
  • tools/src/aden_tools/tools/slack_tool/slack_tool.py
  • tools/src/aden_tools/tools/ssl_tls_scanner/ssl_tls_scanner.py
  • tools/src/aden_tools/tools/stripe_tool/stripe_tool.py
  • tools/src/aden_tools/tools/subdomain_enumerator/subdomain_enumerator.py
  • tools/src/aden_tools/tools/tech_stack_detector/tech_stack_detector.py
  • tools/src/aden_tools/tools/telegram_tool/telegram_tool.py
  • tools/src/aden_tools/tools/trello_tool/trello_tool.py
  • tools/src/aden_tools/tools/twilio_tool/twilio_tool.py
  • tools/src/aden_tools/tools/vercel_tool/vercel_tool.py
  • tools/src/aden_tools/tools/vision_tool/vision_tool.py
  • tools/src/aden_tools/tools/web_scrape_tool/web_scrape_tool.py
  • tools/src/aden_tools/tools/yahoo_finance_tool/yahoo_finance_tool.py
  • tools/src/aden_tools/tools/youtube_tool/youtube_tool.py
  • tools/src/aden_tools/tools/youtube_transcript_tool/youtube_transcript_tool.py
  • tools/src/aden_tools/tools/zoho_crm_tool/tests/test_zoho_crm_tool.py
  • tools/src/aden_tools/tools/zoho_crm_tool/zoho_crm_tool.py
  • tools/src/aden_tools/tools/zoom_tool/zoom_tool.py
  • tools/src/aden_tools/utils/env_helpers.py
  • tools/src/gcu/__init__.py
  • tools/src/gcu/browser/bridge.py
  • tools/src/gcu/browser/refs.py
  • tools/src/gcu/browser/session.py
  • tools/src/gcu/browser/tools/advanced.py
  • tools/src/gcu/browser/tools/inspection.py
  • tools/src/gcu/browser/tools/interactions.py
  • tools/src/gcu/browser/tools/lifecycle.py
  • tools/src/gcu/browser/tools/navigation.py
  • tools/src/gcu/browser/tools/tabs.py
  • tools/tests/integrations/test_input_validation.py
  • tools/tests/integrations/test_registration.py
  • tools/tests/integrations/test_spec_conformance.py
  • tools/tests/test_browser_tools_comprehensive.py
  • tools/tests/test_credential_registry.py
  • tools/tests/test_credentials.py
  • tools/tests/test_file_state_cache.py
  • tools/tests/test_health_checks.py
  • tools/tests/test_live_health_checks.py
  • tools/tests/test_refs.py
  • tools/tests/test_screenshot_normalization.py
  • tools/tests/test_x_page_load_repro.py
  • tools/tests/tools/test_airtable_tool.py
  • tools/tests/tools/test_apollo_tool.py
  • tools/tests/tools/test_arxiv_tool.py
  • tools/tests/tools/test_asana_tool.py
  • tools/tests/tools/test_attio_tool.py
  • tools/tests/tools/test_aws_s3_tool.py
  • tools/tests/tools/test_azure_sql_tool.py
  • tools/tests/tools/test_bigquery_tool.py
  • tools/tests/tools/test_calcom_tool.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

PR Requirements Warning

This PR does not meet the contribution requirements.
If the issue is not fixed within ~24 hours, it may be automatically closed.

PR Author: @Hundao
Found issues: #7057 (assignees: none)
Problem: The PR author must be assigned to the linked issue.

To fix:

  1. Assign yourself (@Hundao) to one of the linked issues
  2. Re-open this PR

Exception: To bypass this requirement, you can:

  • Add the micro-fix label or include micro-fix in your PR title for trivial fixes
  • Add the documentation label or include doc/docs in your PR title for documentation changes

Micro-fix requirements (must meet ALL):

Qualifies Disqualifies
< 20 lines changed Any functional bug fix
Typos & Documentation & Linting Refactoring for "clean code"
No logic/API/DB changes New features (even tiny ones)

Why is this required? See #472 for details.

@github-actions github-actions Bot added pr-requirements-warning PR doesn't follow contribution guidelines. Please fix or it will be auto-closed. and removed pr-requirements-warning PR doesn't follow contribution guidelines. Please fix or it will be auto-closed. labels Apr 16, 2026
@Hundao
Hundao merged commit 589c5b0 into aden-hive:main Apr 16, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant