o
    Îó·i  ã                   @   s’   d dl Z d dlZd dlmZmZmZmZmZ d dlm	Z	 d dl
mZ d dlmZmZ G dd„ deƒZG dd	„ d	eƒZe	d
eee  fdd„ƒZdS )é    N)ÚAnyÚDictÚListÚTypeÚ	TypedDict)Úhookimpl)ÚVersionSourceInterface)Ú_existing_versionÚ_load_pyproject_tomlc                   @   s   e Zd ZU eed< dS )Ú_VersionDataÚversionN)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__© r   r   úXC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\incremental/_hatch.pyr      s   
 r   c                   @   s<   e Zd ZdZdefdd„Zdedeeef ddfdd	„Z	dS )
ÚIncrementalVersionSourceÚincrementalÚreturnc                 C   s*   t j | jd¡}t|ƒ}dt|jƒ ¡ iS )Nú./pyproject.tomlr   )ÚosÚpathÚjoinÚrootr
   r	   Zversion_pathÚpublic)Úselfr   Úconfigr   r   r   Úget_version_data   s   z)IncrementalVersionSource.get_version_datar   Úversion_dataNc                 C   s<   t j | jd¡}t|ƒ}tdt |j¡› dt |¡› d�ƒ‚)Nr   zRun `incremental update z --newversion zB` to set the version.

 See `incremental --help` for more options.)	r   r   r   r   r
   ÚNotImplementedErrorÚshlexÚquoteÚpackage)r   r   r    r   r   r   r   r   Úset_version   s   ÿÿz$IncrementalVersionSource.set_version)
r   r   r   ZPLUGIN_NAMEr   r   r   r   r   r%   r   r   r   r   r      s    "r   r   c                   C   s   t gS )N)r   r   r   r   r   Úhatch_register_version_source$   s   r&   )r   r"   Útypingr   r   r   r   r   Zhatchling.pluginr   Z)hatchling.version.source.plugin.interfacer   r   r	   r
   r   r   r&   r   r   r   r   Ú<module>   s   