From 744ecdaae2d7bed204693a438a7087cf650a89d1 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 25 Oct 2023 14:17:10 -0700 Subject: [PATCH] Cleanup and annotate reason for method override to ensure fallback decorators are handled --- neon_utils/skills/neon_fallback_skill.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/neon_utils/skills/neon_fallback_skill.py b/neon_utils/skills/neon_fallback_skill.py index aa552150..9d43db4b 100644 --- a/neon_utils/skills/neon_fallback_skill.py +++ b/neon_utils/skills/neon_fallback_skill.py @@ -34,7 +34,7 @@ # TODO: Consider deprecation and implementing ovos_workshop directly -class NeonFallbackSkill(NeonSkill, FallbackSkillV1): +class NeonFallbackSkill(FallbackSkillV1, NeonSkill): """ Class that extends the NeonSkill and FallbackSkill classes to provide NeonSkill functionality to any Fallback skill subclassing this class. @@ -60,9 +60,6 @@ def fallback_config(self): return self.config_core["skills"].get("fallbacks", {}) def _register_decorated(self): - LOG.info("Registering decorated methods") + # Explicitly overridden to ensure the correct super call is made + LOG.debug(f"Registering decorated methods for {self.skill_id}") FallbackSkillV1._register_decorated(self) - - def register_fallback(self, *args, **kwargs): - LOG.info("Registering fallback handler") - FallbackSkillV1.register_fallback(self, *args, **kwargs)