(description: str)
return None
:param description: must be for Python
:param description: must be for Python
: param description : must be for Python
def parse_python_version(description: str) -> Optional[int]:
    """
    :param description: must be for Python
    """

    assert is_python_description(description)
    match = re.match(r'([23])\.(?:\d+(?:\.\d+)?|x)', description)
    if match:
        return int(match.group(1))
    match = re.match(r'(?:Python|PyPy) *\(?([23])', description, re.IGNORECASE)
    if match:
        return int(match.group(1))
    return None
def parse_python_version ( description : str ) -> Optional [ int ] : assert is_python_description ( description ) match = re . match ( r'([23])\.(?:\d+(?:\.\d+)?|x)' , description ) if match : return int ( match . group ( 1 ) ) match = re . match ( r'(?:Python|PyPy) *\(?([23])' , description , re . IGNORECASE ) if match : return int ( match . group ( 1 ) ) return None