Skip to content

Commit

Permalink
Add backwards-compat. voc_cache property and setter (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Mar 2, 2023
1 parent e05d9aa commit 47096d9
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit 47096d9

Please sign in to comment.