forked from Hanabi/hanabi-league
Add some comments
This commit is contained in:
parent
ff8ccecf6c
commit
15a1b29b84
2 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,9 @@ class DBConfig:
|
||||||
|
|
||||||
|
|
||||||
def read_db_config() -> DBConfig:
|
def read_db_config() -> DBConfig:
|
||||||
|
"""
|
||||||
|
Reads the DB connection parameters from the config file.
|
||||||
|
"""
|
||||||
config_dir = Path(platformdirs.user_config_dir(constants.APP_NAME, ensure_exists=True))
|
config_dir = Path(platformdirs.user_config_dir(constants.APP_NAME, ensure_exists=True))
|
||||||
config_path = config_dir / constants.DB_CONFIG_FILE_NAME
|
config_path = config_dir / constants.DB_CONFIG_FILE_NAME
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# This file should only contain constants that we use throughout the program,
|
||||||
|
# i.e. stuff that might be changed at some point, but not changed on user-level
|
||||||
|
|
||||||
APP_NAME = 'hanabi-league'
|
APP_NAME = 'hanabi-league'
|
||||||
DB_CONFIG_FILE_NAME = 'config.yaml'
|
DB_CONFIG_FILE_NAME = 'config.yaml'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue