Skip to content

Commit 9880f4a

Browse files
committed
filter improvement
1 parent 2bbb49c commit 9880f4a

File tree

6 files changed

+228
-84
lines changed

6 files changed

+228
-84
lines changed

scripts/all_python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function inst_py()
3838
inst_bin /usr/bin/python3
3939
elif [[ $version == default ]] || [[ $version == env ]] ; then
4040
inst_bin python3
41-
elif [[ ! $version =~ 3\..* ]] ; then
41+
elif [[ ! $version =~ 3\..* ]] || [[ -f $version ]] ; then
4242
inst_bin $version
4343
else
4444
local venv=${AOC_TARGET_DIR:-target}/venv/py$version

scripts/answers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def aoc_available_days(year: int):
8383
"""
8484
Generator over all available days for the given year.
8585
"""
86-
for year in aoc_available_puzzles_dict().get(year, []):
87-
yield year
86+
for day in aoc_available_puzzles_dict().get(year, []):
87+
yield day
8888

8989

9090
def aoc_available_puzzles(filter_year: int = 0):

scripts/inputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def aoc_available_days(year: int):
9191
"""
9292
Generator over all available days for the given year.
9393
"""
94-
for year in aoc_available_puzzles_dict().get(year, []):
95-
yield year
94+
for day in aoc_available_puzzles_dict().get(year, []):
95+
yield day
9696

9797

9898
def aoc_available_puzzles(filter_year: int = 0):

0 commit comments

Comments
 (0)