o
    Vh                      @  sl   d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 er,d dlmZ G dd	 d	e
Zd
S )    )annotations)TYPE_CHECKING)ClassVar)argument)AoT)Command)Argumentc                   @  s4   e Zd ZU dZdZeddgZded< dd	d
ZdS )SourceRemoveCommandzsource removez)Remove source configured for the project.namezSource repository name.zClassVar[list[Argument]]	argumentsreturnintc                 C  s   |  d}| }tg }d}| j D ]}|j |kr*| d|j d d}q||  q|s?| 	d| d dS || jj
jd	< | jj
  d
S )Nr
   FzRemoving source with name <c1>z</c1>.Tz<error>Source with name <c1>z</c1> was not found.</error>   sourcer   )r   lowerr   poetryget_sourcesr
   lineappendto_toml_table
line_error	pyprojectpoetry_configsave)selfr
   
lower_namesourcesremovedr    r   y/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/poetry/console/commands/source/remove.pyhandle   s$   

zSourceRemoveCommand.handleN)r   r   )	__name__
__module____qualname__r
   descriptionr   r   __annotations__r    r   r   r   r   r	      s   
 r	   N)
__future__r   typingr   r   cleo.helpersr   tomlkit.itemsr   poetry.console.commands.commandr   cleo.io.inputs.argumentr   r	   r   r   r   r   <module>   s    