o
    h	                     @  s<   d Z ddlmZ dZdZ	 dddZdd	d
ZdddZdS )z@The `version` module holds the version information for Pydantic.    )annotations)VERSIONversion_infoz2.5.0returnstrc                   C  s   d tddd S )zmReturn the `major.minor` part of Pydantic version.

    It returns '2.1' if Pydantic version is '2.1.1'.
    .N   )joinr   split r   r   F/var/www/html/ai/venv/lib/python3.10/site-packages/pydantic/version.pyversion_short
   s   r   c            
   	   C  s   ddl } ddl}ddlm} ddlm} |jdkr ddlm} nddl	}h d}g }|
 D ]}|jd }||v rD|| d|j  q.t|jt|ddpP|j|t j|j|   d	|d
}	ddd |	 D S )zFReturn complete version information for Pydantic and its dependencies.r   N)Path)      >   email-validatorpydantic-settingspydantic-extra-typesmypyfastapipyrighttyping_extensionsName-
build_info )zpydantic versionzpydantic-core versionzpydantic-core buildzinstall pathzpython versionplatformzrelated packages
c                 s  s0    | ]\}}d  |d t|ddV  qdS )z	{:>30} {}:r   r   N)formatr   replace).0kvr   r   r   	<genexpr>9   s   . zversion_info.<locals>.<genexpr>)r   syspathlibr   pydantic_core._pydantic_core_pydantic_corer   importlib.metadatametadataimportlib_metadatadistributionsappendversionr   __version__getattrbuild_profile__file__resolveparentr	   items)
r   r%   r   pdcr+   package_namesrelated_packagesdistnameinfor   r   r   r      s.   
	
	r   r.   tuple[int, ...]c                 C  s   t tt| dd dS )a  Parse mypy string version to tuple of ints.

    This function is included here rather than the mypy plugin file because the mypy plugin file cannot be imported
    outside a mypy run.

    It parses normal version like `0.930` and dev version
    like `0.940+dev.04cac4b5d911c4f9529e6ce86a27b44f28846f5d.dirty`.

    Args:
        version: The mypy version string.

    Returns:
        A tuple of ints. e.g. (0, 930).
    +r   r   )tuplemapint	partitionr
   )r.   r   r   r   parse_mypy_version<   s   rB   N)r   r   )r.   r   r   r<   )	__doc__
__future__r   _annotations__all__r   r   r   rB   r   r   r   r   <module>   s    

*