File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 11import os
22from pathlib import Path
3- from typing import Union
4-
5- from .path import ProperPath
63
74# variables with leading underscores here indicate that they are to be overwritten by config.py
85# In which case, import their counterparts from src/config.py
1815# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
1916
2017# XDG and other convention variable definitions
21- ENV_XDG_DATA_HOME : Union [ ProperPath , Path , str ] = "XDG_DATA_HOME"
22- ENV_XDG_DOWNLOAD_DIR : Union [ ProperPath , Path , str ] = "XDG_DOWNLOAD_DIR"
23- ENV_XDG_CONFIG_HOME : Union [ ProperPath , Path , str ] = "XDG_CONFIG_HOME"
18+ ENV_XDG_DATA_HOME : str = "XDG_DATA_HOME"
19+ ENV_XDG_DOWNLOAD_DIR : str = "XDG_DOWNLOAD_DIR"
20+ ENV_XDG_CONFIG_HOME : str = "XDG_CONFIG_HOME"
2421TMP_DIR : Path = Path (f"/var/tmp/{ APP_NAME } " )
2522
2623# Fallback definitions
3128# Configuration path definitions
3229SYSTEM_CONFIG_LOC : Path = Path ("/etc" ) / CONFIG_FILE_NAME
3330LOCAL_CONFIG_LOC : Path = (
34- os .getenv (ENV_XDG_CONFIG_HOME ) or FALLBACK_CONFIG_DIR
35- ) / CONFIG_FILE_NAME
31+ Path ( os .getenv (ENV_XDG_CONFIG_HOME , FALLBACK_CONFIG_DIR )) / CONFIG_FILE_NAME
32+ )
3633# In case, $XDG_CONFIG_HOME isn't defined in the machine, it falls back to $HOME/.config/elapi.yml
3734PROJECT_CONFIG_LOC : Path = cur_dir / CONFIG_FILE_NAME
3835
You can’t perform that action at this time.
0 commit comments