from typing import List


def _index_of_first_non_option(tokens: List[str]):
    """
    Find the index of the first token that doesn't start with `-`
    Returns len(tokens) if none is found.
    """
    return next(
        (index for index, token in enumerate(tokens) if token[0] != "-"),
        len(tokens),
    )