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:
@@ -1,4 +1,4 @@
|
||||
"""_DockerBottle — concrete Bottle handle yielded by
|
||||
"""DockerBottle — concrete Bottle handle yielded by
|
||||
DockerBottlePlatform.launch.
|
||||
|
||||
Holds the container name plus the in-container prompt path so
|
||||
@@ -10,8 +10,10 @@ from __future__ import annotations
|
||||
|
||||
import subprocess
|
||||
|
||||
from .. import Bottle
|
||||
|
||||
class _DockerBottle:
|
||||
|
||||
class DockerBottle(Bottle):
|
||||
"""Concrete Bottle for Docker."""
|
||||
|
||||
def __init__(self, container: str, teardown, prompt_path_in_container: str | None):
|
||||
|
||||
Reference in New Issue
Block a user