mirror of
https://github.com/WGDashboard/WGDashboard-PRW.git
synced 2026-08-03 22:42:57 +00:00
Chore: Corrected some documentation and missing parameters
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
|
||||
.idea/*
|
||||
*.db
|
||||
dist
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user