π OpenHands: AI-Driven Development
make runnable a class var (#1679)
Engel Nysta17308108c01
diff --git a/opendevin/events/action/action.py b/opendevin/events/action/action.pyindex f35d4290ad..03fca6af2c 100644--- a/opendevin/events/action/action.py+++ b/opendevin/events/action/action.py@@ -1,13 +1,12 @@from dataclasses import dataclass+from typing import ClassVarfrom opendevin.events.event import Event@dataclassclass Action(Event):- @property- def runnable(self):- return False+ runnable: ClassVar[bool] = Falsedef to_memory(self):d = super().to_memory()diff --git a/opendevin/events/action/agent.py b/opendevin/events/action/agent.pyindex c1e2956aff..dca704713d 100644--- a/opendevin/events/action/agent.py+++ b/opendevin/events/action/agent.py@@ -1,5 +1,5 @@from dataclasses import dataclass, field-from typing import Dict+from typing import ClassVar, Dictfrom opendevin.core.schema import ActionType@@ -24,10 +24,7 @@ class AgentRecallAction(Action):query: strthought: str = ''action: str = ActionType.RECALL-- @property- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str:diff --git a/opendevin/events/action/browse.py b/opendevin/events/action/browse.pyindex 5ecf2bd998..548548f25b 100644--- a/opendevin/events/action/browse.py+++ b/opendevin/events/action/browse.py@@ -1,4 +1,5 @@from dataclasses import dataclass+from typing import ClassVarfrom opendevin.core.schema import ActionType@@ -10,10 +11,7 @@ class BrowseURLAction(Action):url: strthought: str = ''action: str = ActionType.BROWSE-- @property- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str:diff --git a/opendevin/events/action/commands.py b/opendevin/events/action/commands.pyindex 11d0635369..efb88615e7 100644--- a/opendevin/events/action/commands.py+++ b/opendevin/events/action/commands.py@@ -1,4 +1,5 @@from dataclasses import dataclass+from typing import ClassVarfrom opendevin.core.schema import ActionType@@ -11,9 +12,7 @@ class CmdRunAction(Action):background: bool = Falsethought: str = ''action: str = ActionType.RUN-- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str:@@ -32,9 +31,7 @@ class CmdKillAction(Action):id: intthought: str = ''action: str = ActionType.KILL-- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str:@@ -49,9 +46,7 @@ class IPythonRunCellAction(Action):code: strthought: str = ''action: str = ActionType.RUN_IPYTHON-- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = Truedef __str__(self) -> str:ret = '**IPythonRunCellAction**\n'diff --git a/opendevin/events/action/files.py b/opendevin/events/action/files.pyindex 09993d372e..02f0adf116 100644--- a/opendevin/events/action/files.py+++ b/opendevin/events/action/files.py@@ -1,4 +1,5 @@from dataclasses import dataclass+from typing import ClassVarfrom opendevin.core.schema import ActionType@@ -18,10 +19,7 @@ class FileReadAction(Action):end: int = -1thought: str = ''action: str = ActionType.READ-- @property- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str:@@ -36,10 +34,7 @@ class FileWriteAction(Action):end: int = -1thought: str = ''action: str = ActionType.WRITE-- @property- def runnable(self) -> bool:- return True+ runnable: ClassVar[bool] = True@propertydef message(self) -> str: