From bb80173f347a6fec15166d9f7cffcec28943f90c Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Nakazone Batista Date: Sun, 18 Feb 2024 12:15:10 -0300 Subject: [PATCH] Fixes Setup Script --- setup.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 264d9bc..838c60c 100644 --- a/setup.py +++ b/setup.py @@ -2,18 +2,12 @@ from base64 import b64decode, b64encode from dotenv import load_dotenv from envsubst import envsubst from pathlib import Path, PosixPath -from typing import Generator import argparse import warnings import json import os -def unpack_list_dict(dl: list[dict]) -> Generator[tuple[str, str], None, None]: - for d in dl: - yield tuple(d.values()) - - def write_template(template: str, output: str): with open(template, 'r') as template,\ open(output, 'w') as output: @@ -60,8 +54,8 @@ def configure_templates(environment: str): {"template": "template/storage/storage.template.yaml", "output": "deployment/storage/storage.yaml"}, ] - for template, output in unpack_list_dict(MAPPINS): - write_template(template, output) + for mapping in MAPPINS: + write_template(mapping["template"], mapping["output"]) def validate_backend_secret(secret: str):