goodconf/__init__.py
def _load_config(path: str) -> dict:
    """
    Given a file path, parse it based on its extension (YAML or JSON)
    and return the values as a Python dictionary. JSON is the default if an
    extension can't be determined.
    """
    __, ext = os.path.splitext(path)
    if ext in ['.yaml', '.yml']:
        import ruamel.yaml
        loader = ruamel.yaml.safe_load
    else:
        loader = json.load
    with open(path) as f:
        config = loader(f)
    return config
def _load_config(path: str) -> dict:
    """
    Given a file path, parse it based on its extension (YAML or JSON)
    and return the values as a Python dictionary. JSON is the default if an
    extension can't be determined.
    """
    __, ext = os.path.splitext(path)
    if ext in ['.yaml', '.yml']:
        import ruamel.yaml
        loader = ruamel.yaml.safe_load
    else:
        loader = json.load
    with open(path) as f:
        config = loader(f)
    return config
def _load_config ( path : str ) -> dict : __ , ext = os . path . splitext ( path ) if ext in [ '.yaml' , '.yml' ] : import ruamel . yaml loader = ruamel . yaml . safe_load else : loader = json . load with open ( path ) as f : config = loader ( f ) return config
Given a file path, parse it based on its extension (YAML or JSON)
    and return the values as a Python dictionary. JSON is the default if an
    extension can't be determined.
Given a file path parse it based on its extension ( YAML or JSON ) and return the values as a Python dictionary . JSON is the default if an extension can t be determined .