b276227cbb
tracker-policy-pr / check-pr (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 17s
test / unit (pull_request) Successful in 48s
lint / lint (push) Failing after 2m56s
test / integration-firecracker (pull_request) Successful in 3m33s
test / coverage (pull_request) Successful in 21s
test / publish-infra (pull_request) Has been skipped
Split the cli package's two responsibilities out of __init__:
* commands/__init__.py now assembles the COMMANDS registry and
NO_MIGRATION_COMMANDS from the per-command modules — the command
surface lives entirely under commands/.
* __main__.py now owns main() (dispatch + migration gate + exit-code
mapping) alongside the runnable entry guard.
cli/__init__.py shrinks to a shim that re-exports main / COMMANDS /
NO_MIGRATION_COMMANDS, so bot_bottle.cli.main (repo-root cli.py entry)
and the tests' bot_bottle.cli.COMMANDS keep working unchanged. Verified
`python -m bot_bottle.cli` (runpy) and `cli.py` both dispatch; full unit
suite green (2243).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
16 lines
570 B
Python
16 lines
570 B
Python
"""bot-bottle CLI package.
|
|
|
|
The subcommand handlers live in `commands/` and are assembled into the
|
|
COMMANDS registry by `commands/__init__.py`; the dispatcher `main()` lives
|
|
in `__main__.py`. They are re-exported here so `bot_bottle.cli.main`,
|
|
`bot_bottle.cli.COMMANDS`, and `bot_bottle.cli.NO_MIGRATION_COMMANDS` stay
|
|
importable (the repo-root `cli.py` entry point and the tests use them).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .__main__ import main
|
|
from .commands import COMMANDS, NO_MIGRATION_COMMANDS
|
|
|
|
__all__ = ["main", "COMMANDS", "NO_MIGRATION_COMMANDS"]
|