Skip to content

Commit

Permalink
Minor linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 15, 2024
1 parent 07b6a22 commit 4e1c228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ovos_dinkum_listener/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def _handle_listen(self, message: Message):
dur = get_sound_duration(sound)
LOG.debug(f"{sound} duration: {dur} seconds")
self.voice_loop.confirmation_seconds_left = dur
except:
except Exception:
self.voice_loop.confirmation_seconds_left = self.voice_loop.confirmation_seconds
else:
self.voice_loop.state = ListeningState.BEFORE_COMMAND
Expand Down Expand Up @@ -1015,7 +1015,7 @@ def reload_configuration(self):
Configuration object reports a change
"""
if self._config_hash() == self._applied_config_hash:
LOG.info(f"No relevant configuration changed")
LOG.info("No relevant configuration changed")
return
LOG.info("Reloading changed configuration")
if not self._load_lock.acquire(timeout=30):
Expand All @@ -1032,7 +1032,7 @@ def reload_configuration(self):
self.status.set_alive()

if new_hash['stt'] != self._applied_config_hash['stt']:
LOG.info(f"Reloading STT")
LOG.info("Reloading STT")
if self.stt:
LOG.debug(f"old={self.stt.__class__}: {self.stt.config}")
if hasattr(self.stt, "shutdown"):
Expand All @@ -1044,7 +1044,7 @@ def reload_configuration(self):
LOG.debug(f"new={self.stt.__class__}: {self.stt.config}")

if new_hash['fallback'] != self._applied_config_hash['fallback']:
LOG.info(f"Reloading Fallback STT")
LOG.info("Reloading Fallback STT")
if self.fallback_stt:
LOG.debug(f"old={self.fallback_stt.__class__}: "
f"{self.fallback_stt.config}")
Expand All @@ -1058,7 +1058,7 @@ def reload_configuration(self):
f"{self.fallback_stt.config}")

if new_hash['hotwords'] != self._applied_config_hash['hotwords']:
LOG.info(f"Reloading Hotwords")
LOG.info("Reloading Hotwords")
LOG.debug(f"old={self.hotwords.applied_hotwords_config}")
self._reload_event.clear()
self.voice_loop.stop()
Expand All @@ -1067,7 +1067,7 @@ def reload_configuration(self):
LOG.debug(f"new={self.hotwords.applied_hotwords_config}")

if new_hash['loop'] != self._applied_config_hash['loop']:
LOG.info(f"Reloading Listener")
LOG.info("Reloading Listener")
self._reload_event.clear()
self.voice_loop.stop()

Expand Down
2 changes: 1 addition & 1 deletion ovos_dinkum_listener/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def load_plugins(self):
self.loaded_plugins[plug_name] = plug()
self.loaded_plugins[plug_name].bind(self.bus)
LOG.info(f"loaded audio transformer plugin: {plug_name}")
except Exception as e:
except Exception:
LOG.exception(f"Failed to load audio transformer plugin: "
f"{plug_name}")
self.has_loaded = True
Expand Down

0 comments on commit 4e1c228

Please sign in to comment.