diff options
author | David Timber <dxdt@dev.snart.me> | 2024-11-14 06:19:59 +0100 |
---|---|---|
committer | David Timber <dxdt@dev.snart.me> | 2024-11-14 08:24:24 +0100 |
commit | 82891a7b9fcc2d5d7670c071859112f277ad8c6a (patch) | |
tree | a3bb43d4e52e4f24eaacfeb1bc25c274cd1c7a12 /common | |
parent | dd3fc0ca3da1512cff3c985aedae0f9438d39544 (diff) |
Add Gitlab CI ...
- Fix incorrect python shebang for Alpine runners
- Reduce required Python version to 3.0
Diffstat (limited to 'common')
-rw-r--r-- | common/__init__.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/__init__.py b/common/__init__.py index 5770ec96..41f1329a 100644 --- a/common/__init__.py +++ b/common/__init__.py @@ -1,7 +1,6 @@ import math -from typing import Any, Callable -def load_data_from_file (path: str, mask_noent = True) -> dict[str, float]: +def load_data_from_file (path: str, mask_noent = True): try: with open(path) as f: return load_data(f.readline) @@ -9,10 +8,10 @@ def load_data_from_file (path: str, mask_noent = True) -> dict[str, float]: if not mask_noent: raise e - return dict[str, float]() + return dict() -def load_data (read_f: Callable) -> dict[str, float]: - ret = dict[str, float]() +def load_data (read_f): + ret = dict() while True: l = read_f() |