Changed annotation

This commit is contained in:
Vivek Santayana 2022-08-29 19:32:19 +01:00
parent 8a15cbef51
commit f9d76a12ea

View File

@ -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"}:')