Skip to content

fix: support both script and module import styles in agent - #9

Merged
samkujovich merged 1 commit into
mainfrom
fix/agent-imports
Feb 15, 2026
Merged

samkujovich merged 1 commit into
mainfrom
fix/agent-imports

Conversation

@samkujovich

Copy link
Copy Markdown
Owner

Summary

Fix ModuleNotFoundError: No module named 'agent.formatters' when running python agent/agent.py.

Use try/except to handle both import styles:

  • Module: pytest tests/test_agent.py → uses agent.formatters
  • Script: python agent/agent.py → uses formatters directly

Test Plan

  • All 306 tests pass
  • uv run python agent/agent.py --help works

Use try/except to handle imports when running as:
- Module: `pytest tests/test_agent.py` (uses agent.formatters)
- Script: `python agent/agent.py` (uses formatters directly)
@samkujovich
samkujovich merged commit cb7fe75 into main Feb 15, 2026
2 checks passed
@samkujovich
samkujovich deleted the fix/agent-imports branch February 15, 2026 19:51
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