Skip to content

Commit

Permalink
Add back backwards-compat imports (#434)
Browse files Browse the repository at this point in the history
* Adds missing `mycroft.util.record` reference
Fixes `AdaptIntent` for backwards compat.

* Wrap backwards-compat import to avoid init errors

---------

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Apr 5, 2024
1 parent b92b06e commit e14b6e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mycroft/skills/intent_services/adapt_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@
"""An intent parsing service using the Adapt parser."""
from adapt.context import ContextManagerFrame
from adapt.engine import IntentDeterminationEngine
from ovos_workshop.intents import Intent as AdaptIntent, IntentBuilder, Intent
from ovos_workshop.intents import IntentBuilder, Intent
from ovos_core.intent_services.adapt_service import ContextManager, AdaptService


class AdaptIntent(IntentBuilder):
def __init__(self, name=''):
super().__init__(name)
5 changes: 5 additions & 0 deletions mycroft/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@
get_ipc_directory
from mycroft.util.platform import get_arch
from ovos_utils.log import init_service_logger, LOG


def record(*args, **kwargs):
from mycroft.util.audio_test import record
record(*args, **kwargs)

0 comments on commit e14b6e2

Please sign in to comment.