From 7d2bbc60e96c15d4376ac391bdb29881e4fda1d3 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 10 Sep 2024 13:59:20 +0200 Subject: annotate err as no return function --- quiz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quiz.py b/quiz.py index 4ee72e8..c3ffe6c 100755 --- a/quiz.py +++ b/quiz.py @@ -20,6 +20,7 @@ import random import platform import os import tomllib +from typing import NoReturn import subprocess import sys @@ -36,7 +37,7 @@ SHOW_QUESTION_CMD = 'xdg-open' sg.SetOptions(window_location=(0, -200)) -def err(msg: str, status=1): +def err(msg: str, status=1) -> NoReturn: """Print the error message to stderr and exit with status""" print(msg) sys.exit(status) -- cgit v1.2.3