Skip to content

Commit 7784666

Browse files
committed
remove unused arg from should_predict_another_action()
1 parent 556825a commit 7784666

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rasa/core/processor.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,12 @@ def is_action_limit_reached():
478478
# call a registered callback
479479
self.on_circuit_break(tracker, message.output_channel, self.nlg)
480480

481-
# noinspection PyUnusedLocal
482481
@staticmethod
483-
def should_predict_another_action(action_name: Text, events: List[Event]) -> bool:
482+
def should_predict_another_action(action_name: Text) -> bool:
484483
"""Determine whether the processor should predict another action.
485484
486485
Args:
487486
action_name: Name of the latest executed action.
488-
events: List of events returned by the latest executed action.
489487
490488
Returns:
491489
`False` if `action_name` is `ACTION_LISTEN_NAME` or
@@ -567,7 +565,7 @@ async def _run_action(
567565
except ActionExecutionRejection:
568566
events = [ActionExecutionRejected(action.name(), policy, confidence)]
569567
tracker.update(events[0])
570-
return self.should_predict_another_action(action.name(), events)
568+
return self.should_predict_another_action(action.name())
571569
except Exception as e:
572570
logger.error(
573571
f"Encountered an exception while running action '{action.name()}'. "
@@ -588,7 +586,7 @@ async def _run_action(
588586
await self._schedule_reminders(events, tracker, output_channel, nlg)
589587
await self._cancel_reminders(events, tracker)
590588

591-
return self.should_predict_another_action(action.name(), events)
589+
return self.should_predict_another_action(action.name())
592590

593591
def _warn_about_new_slots(self, tracker, action_name, events) -> None:
594592
# these are the events from that action we have seen during training

tests/core/test_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,6 @@ async def test_should_predict_another_action(
490490
should_predict_another_action: bool,
491491
):
492492
assert (
493-
default_processor.should_predict_another_action(action_name, [])
493+
default_processor.should_predict_another_action(action_name)
494494
== should_predict_another_action
495495
)

0 commit comments

Comments
 (0)