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. Helper class for generating Ansible inventory files.
""" """
def __init__(self, location: str) -> None: def __init__(self, location: str) -> None:
self._file_handle = Path(location) self._file_handle = Path(location)
self._groups: dict[str, set[str]] = DefaultDict(set) self._groups: dict[str, set[str]] = DefaultDict(set)

View File

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