From 171b266ec174c1d65764c4b420994f085b428574 Mon Sep 17 00:00:00 2001 From: neonandrii <andrii@neon.ai> Date: Mon, 25 Jan 2021 21:00:06 +0200 Subject: [PATCH] Issue-2812 - Allow overridden converse methods to accept messages - modified the signature check in SkillManager.handle_converse_request and MycroftSkill.converse, and resolving PEP8 issues --- mycroft/skills/mycroft_skill/mycroft_skill.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mycroft/skills/mycroft_skill/mycroft_skill.py b/mycroft/skills/mycroft_skill/mycroft_skill.py index 5606e7a623..1fb14d5db1 100644 --- a/mycroft/skills/mycroft_skill/mycroft_skill.py +++ b/mycroft/skills/mycroft_skill/mycroft_skill.py @@ -334,7 +334,7 @@ class MycroftSkill: """ return None - def converse(self, utterances, lang=None, message=None): + def converse(self, utterances=None, lang=None, message=None): """Handle conversation. This method gets a peek at utterances before the normal intent @@ -343,13 +343,9 @@ class MycroftSkill: To use, override the converse() method and return True to indicate that the utterance has been handled. + utterances and lang are depreciated and shout NOT be used in newer skills + Arguments: - utterances (list): The utterances from the user. If there are - multiple utterances, consider them all to be - transcription possibilities. Commonly, the - first entry is the user utt and the second - is normalized() version of the first utterance - lang: language the utterance is in, None for default message: a message object containing a message type with an optional JSON data packet