aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-09-10 13:59:20 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-09-10 13:59:20 +0200
commit7d2bbc60e96c15d4376ac391bdb29881e4fda1d3 (patch)
tree16bdf0ee44f81f7ae7759c2e82ab20afec64d922
parenteeee3bdc4f71f8d47fd70a0906fa6b82b64e41c7 (diff)
downloadquiz-7d2bbc60e96c15d4376ac391bdb29881e4fda1d3.tar.gz
quiz-7d2bbc60e96c15d4376ac391bdb29881e4fda1d3.zip
annotate err as no return function
-rwxr-xr-xquiz.py3
1 files changed, 2 insertions, 1 deletions
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)