    minor: Optional[int]
    micro: Optional[int]
    dev: Optional[str]

    def __init__(
        self,
        major: Union[int, str],
        minor: Optional[int] = None,
        micro: Optional[int] = None,
        dev: Optional[str] = None,
    ):
        if isinstance(major, str):
            if not all(arg is None for arg in (minor, micro, dev)):
                raise ValueError(