Formatted files using yapf

This commit is contained in:
strNophix 2022-04-08 21:22:16 +02:00
parent db13dfb04b
commit 61428cf80a
2 changed files with 4 additions and 4 deletions

1
cli.py
View File

@ -140,6 +140,7 @@ class InventoryWriter:
"""
Helper class for generating Ansible inventory files.
"""
def __init__(self, location: str) -> None:
self._file_handle = Path(location)
self._groups: dict[str, set[str]] = DefaultDict(set)

View File

@ -78,14 +78,12 @@ def main() -> int:
print(P_BANNER)
customer_name = Prompter.input("Wat is uw naam: ",
lambda x: bool(RE_TEXT.match(x)))
"""
Ensures the necessary customer setup.
"""
envs_dir = path.join("customers", customer_name, "envs")
Path(envs_dir).mkdir(parents=True, exist_ok=True)
p = Prompter(ps1=f"{customer_name} > ")
while True:
print(P_OPTIONS)
@ -103,7 +101,9 @@ def main() -> int:
Used to either update or create an environment.
"""
envs = get_env_list(customer_name)
print(f"NOTE: Kies een albestaande omgevingen {envs} of iets nieuws...")
print(
f"NOTE: Kies een albestaande omgevingen {envs} of iets nieuws..."
)
fmt = "Omgevingsnaam:"
env_name = p.take_input(fmt, RE_TEXT)
@ -136,7 +136,6 @@ def main() -> int:
amnt_nginx_web = "1"
amnt_nginx_lb = "0"
amnt_psql = "0"
"""
Define the format for templating ip-addresses.`{}` is required
and will be subbed at runtime with the correct octet.