Skip to content

Commit f6d9e58

Browse files
committed
Fix day template to consider also the year of the challenge
1 parent 3845ee7 commit f6d9e58

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1212
### Fixed
1313
- Fixed typing in cli module
1414
- Adapt ruff config for a newer version
15+
- Fix day template to consider also the year of the challenge
1516

1617
### Changed
1718
- Update repository to the newest cookiecutter template

src/aoc/templates/day_template/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ def part_2(self, input_lines: list[str]) -> int | str:
1616
if __name__ == "__main__":
1717
if len(sys.argv) > 1:
1818
input_provider = SingleFileInputProvider(
19-
Challenge.day, input_path=Path(sys.argv[1])
19+
Challenge.year, Challenge.day, input_path=Path(sys.argv[1])
2020
)
2121
Challenge(input_provider).run()
2222
else:
23-
Challenge(SmartFileInputProvider(Challenge.day, use_test_data=True)).run()
24-
Challenge(SmartFileInputProvider(Challenge.day)).run()
23+
Challenge(
24+
SmartFileInputProvider(Challenge.year, Challenge.day, use_test_data=True)
25+
).run()
26+
Challenge(SmartFileInputProvider(Challenge.year, Challenge.day)).run()

0 commit comments

Comments
 (0)