Kekkai/chart/utils/load_config.py
Redume 6ff258799d
Some checks failed
Create and publish a Docker image / build-and-push-server (push) Has been cancelled
Create and publish a Docker image / build-and-push-chart (push) Has been cancelled
Create and publish a Docker image / build-and-push-CR (push) Has been cancelled
Deploy docs / deploy (push) Has been cancelled
chore(chart): I put pylint ignore where it's needed. Fixed an error with arguments, paths of imports of local modules
2024-12-16 22:24:26 +03:00

20 lines
734 B
Python

# pylint: disable=R0801
"""
This module provides a function for loading a YAML configuration file.
The function reads the file content and returns it as a Python dictionary.
"""
import yaml
def load_config(file_path: str) -> dict:
"""
Loads a YAML configuration file and returns its contents as a dictionary.
This function opens the specified YAML file, parses its content, and
returns it in dictionary format, making it accessible for use in
the application.
:param file_path: The path to the YAML configuration file to be loaded.
:return: A dictionary containing the parsed content of the YAML file.
"""
with open(file_path, 'r', encoding='utf-8') as file:
return yaml.safe_load(file)