from pathlib import Path
from typing import List
import re


def get_files_with_suffix(
    input_dir: Path, suffix: str, ignore: str = r"(?!x)x"
) -> List[Path]:
    """
    Get absolute files paths from input dir matching the suffix
    :param input_dir:
    :param suffix:
    :param ignore: By default nothing should be ignored
    Never match regex from: https://stackoverflow.com/a/1845097/3883569
    :return:
    """
    return [
        file_path
        for file_path in sorted(input_dir.rglob(f"*{suffix}"))
        if not re.compile(ignore).match(str(file_path))
    ]