@@ -30,7 +30,9 @@ def get_path() -> str:
3030 str: Absolute path to either the directory containing the script or
3131 the script's directory if it is itself a directory.
3232 """
33- return path if os .path .isdir (path := os .path .realpath (sys .argv [0 ])) else os .path .dirname (path )
33+ return (
34+ path if os .path .isdir (path := os .path .realpath (sys .argv [0 ])) else os .path .dirname (path )
35+ )
3436
3537 @staticmethod
3638 def get_session () -> str :
@@ -133,7 +135,9 @@ def download_test_input(day: int, part_num: int) -> str | None:
133135 if response .status_code == 200 :
134136 content = response .text
135137 soup = BeautifulSoup (content , "html.parser" )
136- code_elements = [element for element in soup .find_all ("code" ) if element .text .count ("\n " ) > 0 ]
138+ code_elements = [
139+ element for element in soup .find_all ("code" ) if element .text .count ("\n " ) > 0
140+ ]
137141 return code_elements [part_num - 1 ].text
138142
139143 else :
@@ -181,7 +185,9 @@ def add_day(day: int) -> None:
181185
182186 if file_path .stat ().st_size == 0 :
183187 now = datetime .now ()
184- available_to_download = datetime (int (path .split (os .sep )[- 1 ].split ("-" )[- 1 ]), 12 , day , 5 , 0 , 0 )
188+ available_to_download = datetime (
189+ int (path .split (os .sep )[- 1 ].split ("-" )[- 1 ]), 12 , day , 5 , 0 , 0
190+ )
185191
186192 if now < available_to_download :
187193 logger .info (
@@ -228,7 +234,9 @@ def add_test_input(day: int, part_num: int) -> None:
228234
229235 if file_path .stat ().st_size == 0 :
230236 now = datetime .now ()
231- available_to_download = datetime (int (path .split (os .sep )[- 1 ].split ("-" )[- 1 ]), 12 , day , 5 , 0 , 0 )
237+ available_to_download = datetime (
238+ int (path .split (os .sep )[- 1 ].split ("-" )[- 1 ]), 12 , day , 5 , 0 , 0
239+ )
232240
233241 if now < available_to_download :
234242 logger .info (
@@ -256,7 +264,8 @@ def add_test_file(day: int) -> None:
256264 day (int): The day number (1-25) to create test file for.
257265
258266 Note:
259- Creates test file at: `tests/test_XX.py` using template from `templates/tests/sample.txt`
267+ Creates test file at:
268+ `tests/test_XX.py` using template from `templates/tests/sample.txt`
260269 Replaces placeholders in template with actual day number.
261270
262271 Raises:
0 commit comments