From 1638f40eccc4a1321ee1bf19e3756157b6c965e1 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Mon, 2 Sep 2024 00:21:13 +0200 Subject: refactored code, use get_ship dependency for ship related calls --- modules/task_types.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 modules/task_types.py (limited to 'modules/task_types.py') diff --git a/modules/task_types.py b/modules/task_types.py deleted file mode 100644 index d23ce55..0000000 --- a/modules/task_types.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Annotated -from pydantic.functional_validators import AfterValidator - -IDLE = 'IDLE' -MINING = 'MINING' - -MIA = 'MIA' -ERROR = 'ERROR' - -task_types = [ - IDLE, - MINING, -] - - -def is_task_type(task: str): - assert task in task_types, f"'{task}' is not a valid task type." - return task - - -task_type = Annotated[str, AfterValidator(is_task_type)] -- cgit v1.2.3-70-g09d2