From ed1deeb2595e2927726e44f2aacab5634772754b Mon Sep 17 00:00:00 2001 From: "Matthew D. Scholefield" Date: Thu, 9 Nov 2017 12:20:55 -0600 Subject: [PATCH] Make bool assignment more concise --- mycroft/client/speech/hotword_factory.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mycroft/client/speech/hotword_factory.py b/mycroft/client/speech/hotword_factory.py index 86b413bfb9..b943bc99ea 100644 --- a/mycroft/client/speech/hotword_factory.py +++ b/mycroft/client/speech/hotword_factory.py @@ -195,10 +195,7 @@ class PreciseHotword(HotWordEngine): self.cooldown -= 1 self.has_found = False continue - if float(line) > 0.5: - self.has_found = True - else: - self.has_found = False + self.has_found = float(line) > 0.5 def update(self, chunk): self.proc.stdin.write(chunk)