From 8aeeb7e09c341b69c4e01221847436b00dc6eca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 14 Nov 2022 12:22:42 +0100 Subject: [PATCH] chore: replaced unnamed hook filters by named equivalents --- tutor/commands/cli.py | 13 ++----------- tutor/plugins/v0.py | 5 ++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/tutor/commands/cli.py b/tutor/commands/cli.py index 444316f..a4d75e0 100755 --- a/tutor/commands/cli.py +++ b/tutor/commands/cli.py @@ -127,17 +127,8 @@ def help_command(context: click.Context) -> None: context.invoke(cli, show_help=True) -hooks.filters.add_items( - "cli:commands", - [ - images_command, - config_command, - local, - dev, - k8s, - help_command, - plugins_command, - ], +hooks.Filters.CLI_COMMANDS.add_items( + [images_command, config_command, local, dev, k8s, help_command, plugins_command] ) diff --git a/tutor/plugins/v0.py b/tutor/plugins/v0.py index fe9fc74..52e0c54 100644 --- a/tutor/plugins/v0.py +++ b/tutor/plugins/v0.py @@ -198,8 +198,7 @@ class BasePlugin: hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(templates_root) # We only add the "apps" and "build" folders and we render them in the # "plugins/" folder. - hooks.filters.add_items( - "env:templates:targets", + hooks.Filters.ENV_TEMPLATE_TARGETS.add_items( [ ( os.path.join(self.name, "apps"), @@ -209,7 +208,7 @@ class BasePlugin: os.path.join(self.name, "build"), "plugins", ), - ], + ] ) def _load_command(self) -> None: