From 769665eccfe606f058978eb27cbf4e8f6aa6d2fe Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 18 Nov 2023 17:06:31 +0330 Subject: [PATCH] chore: cleanup --- tutorminio/__about__.py | 1 - tutorminio/plugin.py | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tutorminio/__about__.py b/tutorminio/__about__.py index d945113..610c111 100644 --- a/tutorminio/__about__.py +++ b/tutorminio/__about__.py @@ -1,2 +1 @@ __version__ = "16.0.1" - diff --git a/tutorminio/plugin.py b/tutorminio/plugin.py index aee6358..3411c85 100644 --- a/tutorminio/plugin.py +++ b/tutorminio/plugin.py @@ -53,17 +53,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"),