a
    y{Jh	                     @  sH   d Z ddlmZ dZdZddddZddd	d
ZdddddZdS )z@The `version` module holds the version information for Pydantic.    )annotations)VERSIONversion_infoz2.5.3str)returnc                   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   B/var/www/shaz/venv/lib/python3.9/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 r\|| d|j  q\t|jt|ddp|j|t j|j|   d	|d
}	ddd |	 D S )zFReturn complete version information for Pydantic and its dependencies.r   N)Path)      >   Zfastapizemail-validatorZmypyZpyrightzpydantic-extra-typeszpydantic-settingstyping_extensionsName-Z
build_info )zpydantic versionzpydantic-core versionzpydantic-core buildzinstall pathzpython versionplatformzrelated packages
c                 s  s.   | ]&\}}d  |d t|ddV  qdS )z	{:>30} {}:r   r   N)formatr   replace).0kvr   r   r   	<genexpr>9       zversion_info.<locals>.<genexpr>)r   syspathlibr   Zpydantic_core._pydantic_coreZ_pydantic_corer   importlib.metadatametadataimportlib_metadatadistributionsappendversionr   __version__getattrZbuild_profile__file__resolveparentr	   items)
r   r   r   Zpdcr#   Zpackage_namesZrelated_packagesdistnameinfor   r   r   r      s,    
	
	r   ztuple[int, ...])r&   r   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    r5   N)	__doc__
__future__r   Z_annotations__all__r   r   r   r5   r   r   r   r   <module>   s   *