U
    Fë]j  ã                   @   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	eee  d
œ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   ú[c:\users\psant\downloads\hotstarbackend\school\venv\Lib\site-packages\incremental/_hatch.pyr      s   
r   c                   @   s8   e Zd ZdZedœdd„Zeeeef ddœ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_dataN)r   Úversion_datar   c                 C   s@   t j | jd¡}t|ƒ}tdt |j¡› dt |¡› d�ƒ‚d S )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   