Skip to content

Commit

Permalink
Cleanup and annotate reason for method override to ensure fallback de…
Browse files Browse the repository at this point in the history
…corators are handled
  • Loading branch information
NeonDaniel committed Oct 25, 2023
1 parent 68a7ea8 commit 744ecda
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions neon_utils/skills/neon_fallback_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

0 comments on commit 744ecda

Please sign in to comment.