Skip to content

Commit

Permalink
fix: check the commands inside the loop and format
Browse files Browse the repository at this point in the history
  • Loading branch information
MaferMazu committed Aug 26, 2024
1 parent 018b455 commit f03da32
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tutorpicasso/commands/run_extra_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 += (
Expand Down

0 comments on commit f03da32

Please sign in to comment.