diff --git a/make_argocd_fly/main.py b/make_argocd_fly/main.py index 3be6cf4..44b6a73 100644 --- a/make_argocd_fly/main.py +++ b/make_argocd_fly/main.py @@ -63,7 +63,7 @@ async def generate() -> None: def main() -> None: - parser = argparse.ArgumentParser(description='Render ArgoCD Applications.') + parser = argparse.ArgumentParser(prog='make-argocd-fly', description='Render ArgoCD Applications.') parser.add_argument('--root-dir', type=str, default=os.getcwd(), help='Root directory (default: current directory)') parser.add_argument('--config-file', type=str, default=CONFIG_FILE, help='Configuration file (default: config.yml)') parser.add_argument('--source-dir', type=str, default=SOURCE_DIR, help='Source files directory (default: source)') diff --git a/make_argocd_fly/resource.py b/make_argocd_fly/resource.py index eda720e..7104958 100644 --- a/make_argocd_fly/resource.py +++ b/make_argocd_fly/resource.py @@ -21,10 +21,12 @@ def increase_indent(self, flow=False, *args, **kwargs): def represent_str(dumper, data): - """configures yaml for dumping multiline strings + """configures pyyaml for dumping multiline strings Ref: https://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data""" if data.count('\n') > 0: return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|') + """configure pyyaml for dumping numbers that start with 0 as strings + Ref: https://github.com/yaml/pyyaml/issues/98""" if data.startswith('0'): try: int(data[1:])