Skip to content

fix: python -m chipstream.cli failed with ModuleNotFoundError - #14

Merged
paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-cli-main-module
Nov 23, 2026
Merged

paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-cli-main-module

Conversation

@paulmueller-agent

Copy link
Copy Markdown

Bug

Running the CLI as a module fails, because chipstream/cli/__main__.py imports _main as a top-level module:

$ python -m chipstream.cli --version
Traceback (most recent call last):
  ...
  File ".../chipstream/cli/__main__.py", line 1, in <module>
    from _main import main
ModuleNotFoundError: No module named '_main'

Fix

Use the package-relative import from ._main import main.

Tests

test_cli_python_m runs python -m chipstream.cli --version in a subprocess and checks the exit code and the printed version. It fails on main and passes with the fix. flake8 is clean; ruff shows no new errors.

🤖 Generated with Claude Code

`chipstream/cli/__main__.py` imported `_main` as a top-level module
instead of relative to the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@paulmueller
paulmueller merged commit 3738bdb into DC-analysis:main Nov 23, 2026
7 of 8 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.

2 participants