def METHOD_NAME(
    src: Tuple[str, ...], exclude: Optional[Pattern], extend_exclude: Optional[Pattern], skip_gitignore: bool
):
    root = find_project_root(src)
    if skip_gitignore:
        gitignore = None
    else:
        gitignore = get_gitignore(root)
    sources = set()
    for s in src:
        if s == "-":
            sources.add("-")
            continue
        path = Path(s).resolve()
        if not should_parse_path(path, exclude, extend_exclude, gitignore):
            continue
        if path.is_file():
            sources.add(path)
        elif path.is_dir():
            sources.update(iterate_dir((path,), exclude, extend_exclude, gitignore))
        elif s == "-":
            sources.add(path)
    return sources