diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-09-10 13:59:20 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-09-10 13:59:20 +0200 |
| commit | 7d2bbc60e96c15d4376ac391bdb29881e4fda1d3 (patch) | |
| tree | 16bdf0ee44f81f7ae7759c2e82ab20afec64d922 | |
| parent | eeee3bdc4f71f8d47fd70a0906fa6b82b64e41c7 (diff) | |
| download | quiz-7d2bbc60e96c15d4376ac391bdb29881e4fda1d3.tar.gz quiz-7d2bbc60e96c15d4376ac391bdb29881e4fda1d3.zip | |
annotate err as no return function
| -rwxr-xr-x | quiz.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |
