refactor(bottles): Bottle becomes an ABC; DockerBottle inherits
test / run tests/run_tests.py (pull_request) Successful in 14s
test / run tests/run_tests.py (pull_request) Successful in 14s
Bottle was the only Protocol in an otherwise-ABC family (BottlePlan, BottleCleanupPlan, BottlePlatform are all ABCs). Convert to an ABC with abstract exec_claude / cp_in / close, matching the rest of the hierarchy. Rename _DockerBottle -> DockerBottle: the underscore was a default-Python-private instinct that doesn't match the sibling plan classes (DockerBottlePlan, DockerBottleCleanupPlan), all of which are equally "only constructed by the platform" and yet public-by-name. Re-export DockerBottle from claude_bottle.bottles.docker.
This commit is contained in:
@@ -5,21 +5,23 @@ The bulk of the implementation lives in sibling modules:
|
||||
- util: thin Docker subprocess wrappers
|
||||
- bottle_plan: DockerBottlePlan
|
||||
- bottle_cleanup_plan: DockerBottleCleanupPlan
|
||||
- bottle: _DockerBottle handle
|
||||
- bottle: DockerBottle handle
|
||||
- platform: DockerBottlePlatform
|
||||
|
||||
This file only re-exports the platform class so
|
||||
This file only re-exports the public names so
|
||||
`from claude_bottle.bottles.docker import DockerBottlePlatform` keeps
|
||||
working.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .bottle import DockerBottle
|
||||
from .bottle_cleanup_plan import DockerBottleCleanupPlan
|
||||
from .bottle_plan import DockerBottlePlan
|
||||
from .platform import DockerBottlePlatform
|
||||
|
||||
__all__ = [
|
||||
"DockerBottle",
|
||||
"DockerBottleCleanupPlan",
|
||||
"DockerBottlePlan",
|
||||
"DockerBottlePlatform",
|
||||
|
||||
Reference in New Issue
Block a user