refactor: rename construct_environment method to _construct_environment for consistency across virtual environment providers

This commit is contained in:
Harry
2026-01-05 18:04:55 +08:00
parent 932be0ad64
commit 43daf4f82c
6 changed files with 5 additions and 55 deletions

View File

@ -77,7 +77,7 @@ class DockerDaemonEnvironment(VirtualEnvironment):
DOCKER_IMAGE = "docker_image"
DOCKER_COMMAND = "docker_command"
def construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
def _construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
"""
Construct the Docker daemon virtual environment.
"""

View File

@ -85,7 +85,7 @@ class E2BEnvironment(VirtualEnvironment):
class StoreKey(StrEnum):
SANDBOX = "sandbox"
def construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
def _construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
"""
Construct a new E2B virtual environment.
"""

View File

@ -65,7 +65,7 @@ class LocalVirtualEnvironment(VirtualEnvironment):
NEVER USE IT IN PRODUCTION ENVIRONMENTS.
"""
def construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
def _construct_environment(self, options: Mapping[str, Any], environments: Mapping[str, str]) -> Metadata:
"""
Construct the local virtual environment.