From 9d50882344d49e5ae6c0836ab4de686f99a6e2bc Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 18 Nov 2023 17:06:31 +0330 Subject: [PATCH] chore: cleanup --- tutorminio/plugin.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tutorminio/plugin.py b/tutorminio/plugin.py index f80ce69..60200ad 100644 --- a/tutorminio/plugin.py +++ b/tutorminio/plugin.py @@ -48,17 +48,16 @@ list(config.get("overrides", {}).items()) ) + @tutor_hooks.Filters.APP_PUBLIC_HOSTS.add() def add_minio_hosts( - hosts: list[str], context_name: Literal["local", "dev"] - ) -> list[str]: - if context_name == "dev": - hosts.append("{{ MINIO_CONSOLE_HOST }}:9001") - else: - hosts.append("{{ MINIO_CONSOLE_HOST }}") - + hosts: list[str], context_name: t.Literal["local", "dev"] +) -> list[str]: + port = "9001" if context_name == "dev" else "" + hosts.append(f"{{{{MINIO_CONSOLE_HOST}}}}:{port}") return hosts + # Add pre-init script as init task with high priority with open( os.path.join(HERE, "templates", "minio", "tasks", "minio", "init"),