feat(cli): make bot_bottle.cli runnable with python -m
test / integration-docker (pull_request) Successful in 18s
test / unit (pull_request) Successful in 43s
lint / lint (push) Successful in 2m40s
test / integration-firecracker (pull_request) Successful in 3m22s
test / coverage (pull_request) Successful in 48s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Successful in 6s
test / integration-docker (pull_request) Successful in 18s
test / unit (pull_request) Successful in 43s
lint / lint (push) Successful in 2m40s
test / integration-firecracker (pull_request) Successful in 3m22s
test / coverage (pull_request) Successful in 48s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Successful in 6s
`python -m bot_bottle.cli` failed with "is a package and cannot be directly executed" — the package had a `if __name__ == "__main__"` block in `__init__.py`, which never fires for a package and made the invocation look supported when it wasn't. Add a real `__main__.py` and drop the dead block. Matters for `bb login`, whose docstring documents a `bb` entry point that nothing installs; `-m` is the closest thing to it until there's a console-script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,3 @@ def main(argv: list[str] | None = None) -> int:
|
||||
return e.code if isinstance(e.code, int) else 1
|
||||
except KeyboardInterrupt:
|
||||
return 130
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user