From 58fa26a5d53428653df04a1c02cea5d179081eb8 Mon Sep 17 00:00:00 2001 From: alexAubin Date: Fri, 3 Sep 2021 13:53:54 +0000 Subject: [PATCH] :art: Format Python code with Black --- moulinette/interfaces/cli.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/moulinette/interfaces/cli.py b/moulinette/interfaces/cli.py index 7802b8d1..df812738 100644 --- a/moulinette/interfaces/cli.py +++ b/moulinette/interfaces/cli.py @@ -525,7 +525,15 @@ class Interface: credentials = self.prompt(msg, True, False, color="yellow") return authenticator.authenticate_credentials(credentials=credentials) - def prompt(self, message, is_password=False, confirm=False, color="blue", prefill="", is_multiline=False): + def prompt( + self, + message, + is_password=False, + confirm=False, + color="blue", + prefill="", + is_multiline=False, + ): """Prompt for a value Keyword arguments: @@ -550,14 +558,16 @@ class Interface: return value else: while True: - value = input(colorize(m18n.g("edit_text_question", message), color)) + value = input( + colorize(m18n.g("edit_text_question", message), color) + ) value = value.lower().strip() if value in ["", "n", "no"]: return prefill - elif value in ['y', 'yes']: + elif value in ["y", "yes"]: break - initial_message = prefill.encode('utf-8') + initial_message = prefill.encode("utf-8") with tempfile.NamedTemporaryFile(suffix=".tmp") as tf: tf.write(initial_message)