from pathlib import Path
import yaml


def get_config(base_path: Path):
    """
    Get the config file from the base path.

    :param base_path: The base path to the .fsh-validator.yml File.
    :return: Configuration
    """
    config_file = base_path / ".fsh-validator.yml"

    if not config_file.exists():
        return dict()

    return yaml.safe_load(open(config_file))