o
    $6d                     @   sT   d Z ddlmZ dZdZ	 defddZdefdd	Zd
edeedf fddZ	dS )z@The `version` module holds the version information for Pydantic.    )Tuple)VERSIONversion_infoz2.3.0returnc                   C   s   d tddd S )zjReturn the major.minor part of Pydantic version.

    It return '2.1' if Pydantic version is '2.1.1'.
    .N   )joinr   split r
   r
   gC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\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} ddlm} g }dD ]}z
||dd W n	 t	y3   Y qw |
| qt|jt|ddpE|j|t j|j|   |d	}d
dd | D S )zFReturn complete version information for Pydantic and its dependencies.r   N)import_module)Path)Zdevtoolszemail-validatorztyping-extensions-_Z
build_info)zpydantic versionzpydantic-core versionzpydantic-core buildzinstall pathzpython versionplatformzoptional deps. installed
c                 s   s0    | ]\}}d  |d t|ddV  qdS )z	{:>30} {}:r    N)formatstrreplace).0kvr
   r
   r   	<genexpr>,   s   . zversion_info.<locals>.<genexpr>)r   sys	importlibr   pathlibr   Zpydantic_core._pydantic_coreZ_pydantic_corer   ImportErrorappendr   __version__getattrZbuild_profile__file__resolveparentversionr   items)r   r   r   r   ZpdcZoptional_depspinfor
   r
   r   r      s,   	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   r/   N)
__doc__typingr   __all__r   r   r   r   r-   r/   r
   r
   r
   r   <module>   s    