Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Dec 28, 2023
1 parent 67f20eb commit 4d8353c
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions ovos_utils/skills/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,65 +36,3 @@ def skills_loaded(bus=None):
if reply:
return reply.data['status']
return False


def blacklist_skill(skill, config=None):
config = config or read_mycroft_config()
skills_config = config.get("skills", {})
blacklisted_skills = skills_config.get("blacklisted_skills", [])
if skill not in blacklisted_skills:
blacklisted_skills.append(skill)
conf = {
"skills": {
"blacklisted_skills": blacklisted_skills
}
}
update_mycroft_config(conf)
return True
return False


def whitelist_skill(skill, config=None):
config = config or read_mycroft_config()
skills_config = config.get("skills", {})
blacklisted_skills = skills_config.get("blacklisted_skills", [])
if skill in blacklisted_skills:
blacklisted_skills.pop(skill)
conf = {
"skills": {
"blacklisted_skills": blacklisted_skills
}
}
update_mycroft_config(conf)
return True
return False


@deprecated("This method is deprecated. Skills are now loaded based on "
"`runtime_requirements`", "0.1.0")
def make_priority_skill(skill, config=None):
# config = config or read_mycroft_config()
# skills_config = config.get("skills", {})
# priority_skills = skills_config.get("priority_skills", [])
# if skill not in priority_skills:
# priority_skills.append(skill)
# conf = {
# "skills": {
# "priority_skills": priority_skills
# }
# }
# update_mycroft_config(conf)
# return True
return False


@deprecated("This reference is deprecated, use "
"`ovos_utils.skills.locations.get_default_skill_dir", "0.1.0")
def get_skills_folder(config=None):
return get_default_skills_directory(config)


@deprecated("This reference is deprecated, use "
"`ovos_utils.skills.locations.get_installed_skill_ids", "0.1.0")
def get_installed_skills(config=None):
return get_installed_skill_ids(config)

0 comments on commit 4d8353c

Please sign in to comment.