From f03da32c34dad17540c4226b7ac16ed5ad84a56b Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Mon, 26 Aug 2024 16:45:31 -0500 Subject: [PATCH] fix: check the commands inside the loop and format --- tutorpicasso/commands/run_extra_commands.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tutorpicasso/commands/run_extra_commands.py b/tutorpicasso/commands/run_extra_commands.py index 50970c4..076c699 100644 --- a/tutorpicasso/commands/run_extra_commands.py +++ b/tutorpicasso/commands/run_extra_commands.py @@ -48,11 +48,10 @@ def validate_commands(commands: Any) -> str: for command in flat_commands_list: if "tutor" in command.lower(): continue - - if find_tutor_misspelled(command): - misspelled_commands.append(command) - else: - invalid_commands.append(command) + if find_tutor_misspelled(command): + misspelled_commands.append(command) + else: + invalid_commands.append(command) error_message = "" if invalid_commands: @@ -62,9 +61,7 @@ def validate_commands(commands: Any) -> str: ) if misspelled_commands: - error_message += ( - f"=> Misspelled commands: {', '.join(misspelled_commands)}\n" - ) + error_message += f"=> Misspelled commands: {', '.join(misspelled_commands)}\n" if error_message: error_message += (