from pathlib import Path


def exclude_path(path: Path) -> bool:
    """Checks if this is a directory we should skip"""
    if ".tox" in path.parts:
        return True
    if "build" in path.parts:
        return True
    if path.name == "setup.py":
        return True
    return False