Skip to content

Commit

Permalink
fix Runtime import (All-Hands-AI#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww authored Jul 11, 2024
1 parent 7cbf2d9 commit ced7499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions opendevin/runtime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
from typing import TYPE_CHECKING, Type

from .docker.local_box import LocalBox
from .docker.ssh_box import DockerSSHBox
from .e2b.sandbox import E2BBox
from .sandbox import Sandbox

if TYPE_CHECKING:
from .runtime import Runtime


def get_runtime_cls(name: str) -> Type['Runtime']:
def get_runtime_cls(name: str):
# Local imports to avoid circular imports
if name == 'server':
from .server.runtime import ServerRuntime
Expand Down
3 changes: 2 additions & 1 deletion opendevin/server/session/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from opendevin.core.schema import ConfigType
from opendevin.events.stream import EventStream
from opendevin.llm.llm import LLM
from opendevin.runtime import DockerSSHBox, Runtime, get_runtime_cls
from opendevin.runtime import DockerSSHBox, get_runtime_cls
from opendevin.runtime.runtime import Runtime


class AgentSession:
Expand Down

0 comments on commit ced7499

Please sign in to comment.