diff --git a/pythonwhat/__init__.py b/pythonwhat/__init__.py index 551fcbe..d2ac3ca 100644 --- a/pythonwhat/__init__.py +++ b/pythonwhat/__init__.py @@ -1,3 +1,3 @@ -__version__ = "2.24.3" +__version__ = "2.24.4" from .test_exercise import test_exercise, allow_errors diff --git a/pythonwhat/utils.py b/pythonwhat/utils.py index 31b22fe..bc33d6c 100644 --- a/pythonwhat/utils.py +++ b/pythonwhat/utils.py @@ -7,8 +7,8 @@ def format_code(text): mode = black.FileMode() try: - return black.format_file_contents(text, fast=True, mode=mode) - except (black.NothingChanged, black.InvalidInput, black.CannotSplit): + return black.format_file_contents(text, fast=True, mode=mode).rstrip() + except (black.NothingChanged, black.InvalidInput, IndentationError): return text diff --git a/tests/test_spec.py b/tests/test_spec.py index 299fc44..310ff76 100644 --- a/tests/test_spec.py +++ b/tests/test_spec.py @@ -176,7 +176,6 @@ def car_wash(env): # Get the current simulation time and clock-in the process time yield env.timeout(5) - , but got @@ -186,7 +185,6 @@ def car_wash(env): # Get the current simulation time and clock-in the process time yield env.timeout(5) - """ assert sct_payload["message"] == incorrect_msg