Changed annotation
This commit is contained in:
parent
8a15cbef51
commit
f9d76a12ea
@ -80,7 +80,7 @@ def validate_answer(answers:list, question:dict) -> bool:
|
|||||||
try: return all([check_range(answer=int(answer)) for answer in answers])
|
try: return all([check_range(answer=int(answer)) for answer in answers])
|
||||||
except ValueError: return False
|
except ValueError: return False
|
||||||
|
|
||||||
def render_questions() -> list:
|
def render_questions() -> dict:
|
||||||
answers = []
|
answers = []
|
||||||
try:
|
try:
|
||||||
questions = requests.get(url=f'{SERVER}{FETCH_PATH}questions/').json()
|
questions = requests.get(url=f'{SERVER}{FETCH_PATH}questions/').json()
|
||||||
@ -102,7 +102,7 @@ def render_questions() -> list:
|
|||||||
print(exception)
|
print(exception)
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
def render_results(results:list):
|
def render_results(results:dict):
|
||||||
print('\n---- Results ----\n')
|
print('\n---- Results ----\n')
|
||||||
plural = len(results['playbooks']) > 1
|
plural = len(results['playbooks']) > 1
|
||||||
print(f'Your { "results are" if plural else "result is"}:')
|
print(f'Your { "results are" if plural else "result is"}:')
|
||||||
|
Loading…
Reference in New Issue
Block a user