diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
| commit | 4539f87e36cb3ca554e1e174c19206b552107c57 (patch) | |
| tree | 6f9aca818989773cc10f3c465224a07f847eb279 /Scripts/app_config.py | |
| parent | f6b93a20d754579008076e85f5c0a97e1bcbc258 (diff) | |
Delete unused filesv1.0.0-beta00
Diffstat (limited to 'Scripts/app_config.py')
| -rw-r--r-- | Scripts/app_config.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Scripts/app_config.py b/Scripts/app_config.py deleted file mode 100644 index f911456..0000000 --- a/Scripts/app_config.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import sys -import typing - -def getConfig(path: str) -> typing.Dict[str, typing.Union[str, float, int, bool]]: - # Helper functions to detect and convert the type - def is_int(value: str) -> bool: - try: - int(value) - return True - except ValueError: - return False - - def is_float(value: str) -> bool: - try: - float(value) - return True - except ValueError: - return False - - def convert_value(key: str, value: str): - if key.startswith(("enable_", "remove_", "use_", "clear_")): - return bool(int(value)) - elif is_int(value): - return int(value) - elif is_float(value): - return float(value) - else: - return value - - config = {} - with open(path, 'r') as file: - for line in file: - key_value = line.strip().split(": ", maxsplit=1) - key = key_value[0] - value = key_value[1] if len(key_value) > 1 else "" - config[key] = convert_value(key, value.strip()) - return config - |
