We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc47a76 commit e8925dfCopy full SHA for e8925df
src/adventofcode/util/module_helpers.py
@@ -41,11 +41,12 @@ def clean_year(year_path: str) -> int:
41
42
def clean_day(day_file: str) -> int:
43
"""
44
- Removes the 'day_' prefix and .py extension from the day file
+ Removes the 'day_' prefix, _year suffix and .py extension from the day file
45
46
segments = day_file.split(os.sep)
47
day_segment = segments[-1].replace('.py', '')
48
- return int(day_segment[4:])
+
49
+ return int(day_segment[4:-5])
50
51
52
def year_dir_from_path(year_dir: str) -> str:
0 commit comments