add support for top-level map manifest

This commit is contained in:
Anthony Sottile 2025-11-19 16:14:54 -05:00 committed by anthony sottile
parent 9c7ea88ab9
commit 7cad9ec27f
10 changed files with 156 additions and 61 deletions

View file

@ -344,7 +344,8 @@ def local_python_config():
repo_path = get_resource_path('python_hooks_repo')
manifest = load_manifest(os.path.join(repo_path, C.MANIFEST_FILE))
hooks = [
dict(hook, additional_dependencies=[repo_path]) for hook in manifest
{'id': hook_id, **hook, 'additional_dependencies': [repo_path]}
for hook_id, hook in manifest['hooks'].items()
]
return {'repo': 'local', 'hooks': hooks}