Skip to content

chore: remove 15 unused imports (fixes #984)#1211

Open
chrisyangxiaoqi wants to merge 1 commit into
Abilityai:mainfrom
chrisyangxiaoqi:chore/fix-unused-imports
Open

chore: remove 15 unused imports (fixes #984)#1211
chrisyangxiaoqi wants to merge 1 commit into
Abilityai:mainfrom
chrisyangxiaoqi:chore/fix-unused-imports

Conversation

@chrisyangxiaoqi

Copy link
Copy Markdown

Summary

Removes all imports in src/backend/routers/agents.py that trigger ruff F401 errors (imported but unused).

Changes

The following imports were removed:/n- docker (line 14)

  • pathlib.Path (line 16)
  • services.docker_service.docker_client (line 25)
  • services.docker_utils.container_reload (line 30)
  • services.docker_utils.volume_get (line 31)
  • services.docker_utils.volume_remove (line 31)
  • services.image_generation_prompts.AVATAR_EMOTIONS (line 34)
  • services.git_service (line 33)
  • services.agent_service.get_agents_by_prefix (line 44)
  • services.agent_service.get_next_version_name (line 45)
  • services.agent_service.get_latest_version (line 46)
  • services.agent_service.check_shared_folder_mounts_match (line 47)
  • services.agent_service.check_api_key_env_matches (line 48)
  • services.agent_service.recreate_container_with_updated_config (line 52)

Verification

ruff check src/backend/routers/agents.py --output-format=concise

No F401 errors remain.

Fixes #984

Remove imports that are imported but unused (ruff F401):

- docker (imported but unused)
- pathlib.Path (imported but unused)
- services.docker_service.docker_client (imported but unused)
- services.docker_utils.container_reload (imported but unused)
- services.docker_utils.volume_get (imported but unused)
- services.docker_utils.volume_remove (imported but unused)
- services.image_generation_prompts.AVATAR_EMOTIONS (imported but unused)
- services.git_service (imported but unused)
- services.agent_service.get_agents_by_prefix (imported but unused)
- services.agent_service.get_next_version_name (imported but unused)
- services.agent_service.get_latest_version (imported but unused)
- services.agent_service.check_shared_folder_mounts_match (imported but unused)
- services.agent_service.check_api_key_env_matches (imported but unused)
- services.agent_service.recreate_container_with_updated_config (imported but unused)

Fixes Abilityai#984
@vybe

vybe commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for the cleanup! 🙏 One process note before this can be merged:

Per Trinity's SDLC (CLAUDE.md → SDLC, and .claude/DEVELOPMENT_WORKFLOW.md), contributor PRs land on dev first — work flows feature → dev → main, and main only ever receives release PRs cut from dev. This PR is currently based on main.

Could you retarget the base branch from main to dev? You can do it in place: click Edit next to the PR title and change the base dropdown to dev — no need to close/reopen. (You may need to rebase onto dev afterward.)

Thanks again for the contribution!

@vybe

vybe commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Heads up @chrisyangxiaoqi — this PR targets main, but Trinity's flow is feature/* → dev → main (only release cuts and hotfix cherry-picks go straight to main). Could you retarget the base branch to dev? The change itself (removing 15 unused imports, fixes #984) is fine — just needs to land on dev so it flows through the normal integration → release path. You can switch the base via the 'Edit' button at the top of the PR.

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.

chore: clean up 15 unused imports in src/backend/routers/agents.py (ruff F401)

2 participants