Skip to content

Commit f3e1392

Browse files
committed
Refactor condition
1 parent ee77433 commit f3e1392

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

solution_runner/commands/setup_command.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ def command(year: int, day: int, should_use_cache: bool):
5353
input_file = (year_inputs_directory / day).with_suffix(FileExtensions.TEXT)
5454

5555
if (
56-
should_use_cache and input_file.exists() and input_file.stat().st_size == 0
57-
): # Don't abort if the file exists, but it's empty.
56+
should_use_cache
57+
and input_file.exists()
58+
and input_file.stat().st_size
59+
== 0 # Don't abort if the file exists, but it's empty.
60+
):
5861
_abort_input_file_already_exists(year, day)
5962

6063
_download_input(year, day, input_file)

0 commit comments

Comments
 (0)