Skip to content

Commit

Permalink
rename kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 21, 2023
1 parent 3771b4b commit 5c53310
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ovos_workshop/decorators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ovos_utils import classproperty


def backwards_compat(classic_core=None, pre_007=None, no_core=None):
def backwards_compat(classic_core=None, pre_008=None, no_core=None):
"""
Decorator to run a different method if specific ovos-core versions are detected
"""
Expand Down Expand Up @@ -42,8 +42,8 @@ def backwards_compat_decorator(func):
def func_wrapper(*args, **kwargs):
if is_classic and callable(classic_core):
return classic_core(*args, **kwargs)
if is_old and callable(pre_007):
return pre_007(*args, **kwargs)
if is_old and callable(pre_008):
return pre_008(*args, **kwargs)
if is_standalone and callable(no_core):
return no_core(*args, **kwargs)
return func(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion ovos_workshop/skills/common_query_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def __handle_query_classic(self, message):
# Invoke derived class to provide playback data
self.CQS_action(phrase, data)

@backwards_compat(classic_core=__handle_query_classic, pre_007=__handle_query_classic)
@backwards_compat(classic_core=__handle_query_classic, pre_008=__handle_query_classic)
def __handle_query_action(self, message):
"""Message handler for question:action.
Expand Down
2 changes: 1 addition & 1 deletion ovos_workshop/skills/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __get_bases_classic():
return (FallbackSkillV1, FallbackSkill, _MetaFB)

@backwards_compat(classic_core=__get_bases_classic,
pre_007=__get_bases_classic)
pre_008=__get_bases_classic)
@staticmethod
def __get_bases():
LOG.debug("Using V2 Fallback")
Expand Down
2 changes: 1 addition & 1 deletion ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _play_audio_classic(self, filename: str, instant: bool = False):
"falling back to local skill playback")
play_audio(filename).wait()

@backwards_compat(pre_007=_play_audio_old, classic_core=_play_audio_classic)
@backwards_compat(pre_008=_play_audio_old, classic_core=_play_audio_classic)
def play_audio(self, filename: str, instant: bool = False):
"""
Queue and audio file for playback
Expand Down

0 comments on commit 5c53310

Please sign in to comment.