Add ensure function to check cutekit version

This commit is contained in:
Sleepy Monax 2023-11-11 19:03:19 +01:00
parent 367df1034d
commit b1415cce16

View file

@ -12,6 +12,19 @@ from . import (
)
def ensure(version: tuple[int, int, int]):
if (
const.VERSION[0] == version[0]
and const.VERSION[1] == version[1]
and const.VERSION[2] >= version[2]
):
return
raise RuntimeError(
f"Expected cutekit version {version[0]}.{version[1]}.{version[2]} but found {const.VERSION_STR}"
)
def setupLogger(verbose: bool):
if verbose:
logging.basicConfig(