Change 'challenge' into 'exercises' so questions are correctly counted
This commit is contained in:
parent
7dc878fb55
commit
cc848b135d
@ -41,7 +41,8 @@ def get_question_list(file_list: List[bytes]) -> list:
|
||||
|
||||
def get_answered_questions(question_list: List[List[bytes]]) -> list:
|
||||
"""Dont let the type hint confuse you, problem of not using classes.
|
||||
It needs the result of get_question_list(file_list)
|
||||
|
||||
It takes the result of get_question_list(file_list)
|
||||
|
||||
Returns a list of questions that are answered.
|
||||
"""
|
||||
@ -63,7 +64,7 @@ def get_answered_questions(question_list: List[List[bytes]]) -> list:
|
||||
|
||||
|
||||
def get_challenges_count() -> int:
|
||||
challenges_path = pathlib.Path(__file__).parent.parent.joinpath('challenges').glob('*.md')
|
||||
challenges_path = pathlib.Path(__file__).parent.parent.joinpath('exercises').glob('*.md')
|
||||
return len(list(challenges_path))
|
||||
|
||||
|
||||
|
@ -21,7 +21,9 @@ file_list = [line.rstrip() for line in file]
|
||||
question_list = get_question_list(file_list)
|
||||
question_count = len(question_list)
|
||||
total_count = question_count + get_challenges_count()
|
||||
|
||||
print(question_count)
|
||||
print(get_challenges_count())
|
||||
print(total_count)
|
||||
for line in file:
|
||||
if LINE_FLAG in line:
|
||||
file[file.index(line)] = b':bar_chart: There are currently **%s** questions\r\n' %\
|
||||
|
Loading…
Reference in New Issue
Block a user