Chore: Corrected some documentation and missing parameters

This commit is contained in:
Donald Zou
2026-04-17 16:09:34 +08:00
parent 98cba45616
commit 456484cf7d
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
.idea/*
*.db
dist
+5 -5
View File
@@ -8,9 +8,9 @@ from .config_utils import config_utils
class config():
@staticmethod
def filter(config_data: dict, filter_keyword: str) -> tuple[bool, dict]:
'''
"""
Helper function to grab a specific part of the config
'''
"""
lower_filter_keyword = filter_keyword.lower()
for section_name, section_values in config_data.items():
@@ -23,9 +23,9 @@ class config():
@staticmethod
def read() -> tuple[bool, dict]:
'''
"""
check some basic things and then return the dict containing the config data
'''
"""
ok, candidate_path = config_utils.search_known_paths()
if not ok:
@@ -46,7 +46,7 @@ class config():
ok, config_data = config.read()
if not ok:
log.error("failed to read the config succesfully")
log.error("failed to read the config successfully")
return False
if not config_utils.find_section(config_data, lower_target_section):
+2 -2
View File
@@ -8,9 +8,9 @@ import os
class config_utils():
@staticmethod
def search_known_paths() -> tuple[bool, str]:
'''
"""
Look at predefined paths on the filesystem for a config file
'''
"""
possible_config_locations = [
"./config.ini",
+1 -1
View File
@@ -40,7 +40,7 @@ class localeman:
return json.load(lang_file)
return None
def get_available_languages():
def get_available_languages(self):
available_languages_path = "./static/locales/supported_locales.json"
with open(os.path.join(available_languages_path), "r") as f: