
    Vh                         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e      Z G d d	e	      Zed
eee	      fd       Zy)    N)AnyDictListType	TypedDict)VersionSourceInterface)hookimpl)_load_pyproject_toml_existing_versionc                       e Zd ZU eed<   y)_VersionDataversionN)__name__
__module____qualname__str__annotations__     B/home/dcms/DCMS/lib/python3.12/site-packages/incremental/_hatch.pyr   r      s    Lr   r   c                   :    e Zd ZdZdefdZdedeeef   ddfdZ	y)IncrementalVersionSourceincrementalreturnc                     t         j                  j                  | j                  d      }t	        |      }dt        |j                        j                         iS )Nz./pyproject.tomlr   )ospathjoinrootr
   r   version_pathpublic)selfr   configs      r   get_version_dataz)IncrementalVersionSource.get_version_data   sE    ww||DII'9:%d+,V-@-@AHHJKKr   r   version_dataNc                 F    t        dt        j                  |       d      )Nz0Run `python -m incremental.version --newversion zT` to set the version.

 See `python -m incremental.version --help` for more options.)NotImplementedErrorshlexquote)r"   r   r%   s      r   set_versionz$IncrementalVersionSource.set_version   s/    !G$% &LM
 	
r   )
r   r   r   PLUGIN_NAMEr   r$   r   r   r   r*   r   r   r   r   r      s7    KL, L

3 
d38n 
 
r   r   r   c                      t         gS )N)r   r   r   r   hatch_register_version_sourcer-   "   s    $%%r   )r   r(   typingr   r   r   r   r   )hatchling.version.source.plugin.interfacer   hatchling.pluginr	   r   r
   r   r   r   r-   r   r   r   <module>r1      s[    
  3 3 L % ?9 
5 
  
&tD1G,H'I & 
&r   