def yaml_files(path):
    """
    Return files that are YAML (end with .yml or .yaml)

    :param path: Directory path object
    :return: list of paths to YAML files
    """
    return [
        p
        for p in path.iterdir()
        if p.is_file() and p.suffix.lower() in (".yml", ".yaml")
    ]