Skip to content

Commit

Permalink
Merge pull request #6219 from howl-anderson/feature/tiny_optimisation
Browse files Browse the repository at this point in the history
A tiny optimization in code
  • Loading branch information
degiz authored Jul 21, 2020
2 parents f96a0f0 + e5ac4f7 commit 2665656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rasa/core/actions/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def combine_user_with_default_actions(user_actions: List[Text]) -> List[Text]:
# implicitly assume that e.g. "action_listen" is always at location
# 0 in this array. to keep it that way, we remove the duplicate
# action names from the users list instead of the defaults
unique_user_actions = [a for a in user_actions if a not in default_action_names()]
return default_action_names() + unique_user_actions
defaults = default_action_names()
unique_user_actions = [a for a in user_actions if a not in defaults]
return defaults + unique_user_actions


def combine_with_templates(
Expand Down

0 comments on commit 2665656

Please sign in to comment.