Skip to content

Commit 774c329

Browse files
committed
Fix types in apply_effects
1 parent bc35d05 commit 774c329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

genfond/state_space_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def apply_action_effects(state: State, action: Action) -> set[State]:
9999
return apply_effects(frozenset({state}), action.effect)
100100

101101

102-
def apply_effects(states: Collection[State], effects: Collection[Optional[Formula]]) -> set[State]:
102+
def apply_effects(states: Collection[State], effects: Formula | Collection[Formula]) -> set[State]:
103103
new_states: set[State] = set()
104104
for state in states:
105105
new_states |= apply_effects_to_state(state, effects)
@@ -108,7 +108,7 @@ def apply_effects(states: Collection[State], effects: Collection[Optional[Formul
108108
return new_states
109109

110110

111-
def apply_effects_to_state(state: State, effects: Collection[Optional[Formula]]) -> set[State]:
111+
def apply_effects_to_state(state: State, effects: Formula | Collection[Formula]) -> set[State]:
112112
assert all(isinstance(f, (Predicate, FunctionEqualTo)) for f in state)
113113
if isinstance(effects, Collection):
114114
states = {state}

0 commit comments

Comments
 (0)