Skip to content

Commit 616f29b

Browse files
Resolves #96 (#97)
* fix(issue-96): Small corrections Add return in get_action Correct return type in get_actions and get_excluded_actions * refactor(issue-96): Formatted import block
1 parent 42e5ce7 commit 616f29b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

urnai/actions/action_space_base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from abc import ABC, abstractmethod
22

3+
from urnai.actions.action_base import ActionBase
4+
35

46
class ActionSpaceBase(ABC):
57
"""
@@ -31,12 +33,12 @@ def reset(self) -> None:
3133
...
3234

3335
@abstractmethod
34-
def get_actions(self) -> list[int]:
36+
def get_actions(self) -> list[ActionBase]:
3537
"""Returns all the actions that the agent can choose from."""
3638
...
3739

3840
@abstractmethod
39-
def get_excluded_actions(self, obs) -> list[int]:
41+
def get_excluded_actions(self, obs) -> list[ActionBase]:
4042
"""Returns a subset of actions that can't be chosen by the agent."""
4143
...
4244

urnai/actions/chain_of_actions_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self):
1414

1515
def get_action(self, action_index) -> ActionBase:
1616
if action_index < self.length:
17-
self.action_list[action_index]
17+
return self.action_list[action_index]
1818

1919
@property
2020
def length(self) -> int:

0 commit comments

Comments
 (0)