Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Remove duplicated skill and python dependencies in `get_skill_data_fr…
Browse files Browse the repository at this point in the history
…om_directory`
  • Loading branch information
NeonDaniel committed Feb 17, 2022
1 parent 344833d commit 89d317d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ovos_skills_manager/local_skill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ def get_skill_data_from_directory(skill_dir: str):
with open(join(root_dir, f)) as fi:
reqs = [r for r in fi.read().split("\n") if r.strip()]
skill_data["requirements"]["skill"] += reqs
# de-dupe requirements
skill_data["requirements"]["python"] = \
list(set(skill_data["requirements"]["python"]))
skill_data["requirements"]["skill"] = \
list(set(skill_data["requirements"]["skill"]))
skill_data['foldername'] = fold # Override what the config specifies
skill_data['authorname'] = skill_data.get('authorname') or "local"
return skill_data

0 comments on commit 89d317d

Please sign in to comment.