Reformat using black

This commit is contained in:
Deniz Şafak
2025-07-30 02:31:49 +03:00
parent 1fe5a73c98
commit e60a1f7e42
4 changed files with 35 additions and 14 deletions
+11 -3
View File
@@ -74,24 +74,32 @@ def get_user_config_path():
if os.path.exists(custom_dir):
config_dir = custom_dir
else:
config_dir = user_config_dir("abogen", appauthor=False, roaming=True, ensure_exists=True)
config_dir = user_config_dir(
"abogen", appauthor=False, roaming=True, ensure_exists=True
)
else:
# Windows and fallback case
config_dir = user_config_dir("abogen", appauthor=False, roaming=True, ensure_exists=True)
config_dir = user_config_dir(
"abogen", appauthor=False, roaming=True, ensure_exists=True
)
return os.path.join(config_dir, "config.json")
# Define cache path
def get_user_cache_path(folder=None):
from platformdirs import user_cache_dir
cache_dir = user_cache_dir("abogen", appauthor=False, opinion=True, ensure_exists=True)
cache_dir = user_cache_dir(
"abogen", appauthor=False, opinion=True, ensure_exists=True
)
if folder:
cache_dir = os.path.join(cache_dir, folder)
# Ensure the directory exists
os.makedirs(cache_dir, exist_ok=True)
return cache_dir
_sleep_procs = {"Darwin": None, "Linux": None} # Store sleep prevention processes