Skip to content

Commit cc848b1

Browse files
committed
Change 'challenge' into 'exercises' so questions are correctly counted
1 parent 7dc878f commit cc848b1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/question_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def get_question_list(file_list: List[bytes]) -> list:
4141

4242
def get_answered_questions(question_list: List[List[bytes]]) -> list:
4343
"""Dont let the type hint confuse you, problem of not using classes.
44-
It needs the result of get_question_list(file_list)
44+
45+
It takes the result of get_question_list(file_list)
4546
4647
Returns a list of questions that are answered.
4748
"""
@@ -63,7 +64,7 @@ def get_answered_questions(question_list: List[List[bytes]]) -> list:
6364

6465

6566
def get_challenges_count() -> int:
66-
challenges_path = pathlib.Path(__file__).parent.parent.joinpath('challenges').glob('*.md')
67+
challenges_path = pathlib.Path(__file__).parent.parent.joinpath('exercises').glob('*.md')
6768
return len(list(challenges_path))
6869

6970

scripts/update_question_number.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
question_list = get_question_list(file_list)
2222
question_count = len(question_list)
2323
total_count = question_count + get_challenges_count()
24-
24+
print(question_count)
25+
print(get_challenges_count())
26+
print(total_count)
2527
for line in file:
2628
if LINE_FLAG in line:
2729
file[file.index(line)] = b':bar_chart:  There are currently **%s** questions\r\n' %\

0 commit comments

Comments
 (0)