refactor: rewrite some endpoints to speed up execution

This commit is contained in:
Alexandre Teles
2022-12-26 17:20:58 -03:00
parent b2641b5351
commit c572873f08
16 changed files with 603 additions and 368 deletions

View File

@ -1,4 +1,4 @@
import toml
import tomllib as toml
def load_config() -> dict:
"""Loads the config.toml file.
@ -6,4 +6,7 @@ def load_config() -> dict:
Returns:
dict: the config.toml file as a dict
"""
return toml.load("config.toml")
with open('config.toml', 'rb') as config_file:
return toml.load(config_file)