Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backwards-compat. voc_cache property and setter #55

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ovos_workshop/skills/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,21 @@ def network_requirements(self):
"will be removed in ovos-core 0.0.8")
return self.runtime_requirements

@property
def voc_match_cache(self):
"""
Backwards-compatible accessor method for vocab cache
@return: dict vocab resources to parsed resources
"""
return self._voc_cache

@voc_match_cache.setter
def voc_match_cache(self, val):
LOG.warning("self._voc_cache should not be modified externally. This"
"functionality will be deprecated in a future release")
if isinstance(val, dict):
self._voc_cache = val

# property not present in mycroft-core
@property
def _is_fully_initialized(self):
Expand Down