Skip to content

Commit

Permalink
Remove duplicated __init__ function in get_name_and_drink
Browse files Browse the repository at this point in the history
  • Loading branch information
haiwei-luo committed Jul 24, 2024
1 parent 40cf4a0 commit 76d0f58
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions tasks/receptionist/src/receptionist/states/get_name_and_drink.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,49 +162,3 @@ def __init__(
"failed_drink": "failed_drink",
},
)

def __init__(
self,
guest_id: str,
last_resort: bool,
param_key: str = "/receptionist/priors",
):

self._guest_id = guest_id
self._param_key = param_key
self._last_resort = last_resort

smach.StateMachine.__init__(
self,
outcomes=["succeeded", "failed", "failed_name", "failed_drink"],
input_keys=["guest_transcription", "guest_data"],
output_keys=["guest_data", "guest_transcription"],
)
with self:

smach.StateMachine.add(
"PARSE_NAME_AND_DRINK",
self.ParseNameAndDrink(
guest_id=self._guest_id, param_key=self._param_key
),
transitions={"succeeded": "succeeded", "failed": "SPEECH_RECOVERY"},
)
smach.StateMachine.add(
"SPEECH_RECOVERY",
SpeechRecovery(self._guest_id, self._last_resort),
transitions={
"succeeded": "succeeded",
"failed": "POST_RECOVERY_DECISION",
},
)
smach.StateMachine.add(
"POST_RECOVERY_DECISION",
self.PostRecoveryDecision(
guest_id=self._guest_id, param_key=self._param_key
),
transitions={
"failed": "failed",
"failed_name": "failed_name",
"failed_drink": "failed_drink",
},
)

0 comments on commit 76d0f58

Please sign in to comment.