def detect_pre_commit()

in scripts/utils.py [0:0]


def detect_pre_commit() -> Command | None:
    """
    Try to detect pre-commit.
    Returns:
        a command if pre-commit is detected.
    """
    try:
        return Command("pre-commit")
    except CommandNotFound:
        return None