From 4ca96bbf8c98879c4efc976bfe528f8412b1c2a9 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 6 Feb 2025 19:13:58 +0530 Subject: [PATCH] Fix types usage --- stack_orchestrator/deploy/webapp/deploy_webapp.py | 3 ++- .../deploy/webapp/deploy_webapp_from_registry.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stack_orchestrator/deploy/webapp/deploy_webapp.py b/stack_orchestrator/deploy/webapp/deploy_webapp.py index fd51f055..871f227e 100644 --- a/stack_orchestrator/deploy/webapp/deploy_webapp.py +++ b/stack_orchestrator/deploy/webapp/deploy_webapp.py @@ -14,6 +14,7 @@ # along with this program. If not, see . import shutil +from typing import List import click import os import yaml @@ -39,7 +40,7 @@ def _fixup_container_tag(deployment_dir: str, image: str): wfile.write(contents) -def _fixup_url_spec(spec_file_name: str, urls: list[str]): +def _fixup_url_spec(spec_file_name: str, urls: List[str]): spec_file_path = Path(spec_file_name) # Load existing spec diff --git a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py index a31467f6..c8cf0ced 100644 --- a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py @@ -20,6 +20,7 @@ import shutil import sys import tempfile import time +from typing import List import uuid import yaml @@ -184,7 +185,7 @@ def process_app_deployment_request( # noqa % (app_deployment_lrn, existing_deployment_dir) ) - previous_app_deployment_lrns: list[str] = deployment_record.names + previous_app_deployment_lrns: List[str] = deployment_record.names previous_fqdns = [lrn.removeprefix(f"{deployment_record_namespace}/") for lrn in previous_app_deployment_lrns] fqdns_to_release = list(set(previous_fqdns) - set(fqdns))