a
    `7                     @   sp   d Z ddlmZ ddlZddlZddlmZ ddlm	Z	 ddlm
Z
 e	je
jdZG dd	 d	ejZd
d ZdS )zCModule containing some of the logic for our VCS installation logic.    )print_functionN)
exceptions)git)	mercurial)r   r   c                   @   s   e Zd ZdZdddZdS )InstallActionz-argparse action to run the hook installation.Nc           	   
   C   s   t | }d}d}z
| }W n6 tjyP } ztt| d}W Y d}~n
d}~0 0 |sdtd| tdtjd t| o||dS )z5Perform the argparse action for installing vcs hooks.FTNz Could not find the {0} directoryz
WARNING: flake8 vcs hooks integration is deprecated and scheduled for removal in 4.x.  For more information, see https://gitlab.com/pycqa/flake8/issues/568)file)	_INSTALLERSexcZHookInstallationErrorprintstrformatsysstderr
SystemExit)	selfparser	namespacevalueoption_stringZ	installerZerroredZ
successfulZ
hook_error r   .lib/python3.9/site-packages/flake8/main/vcs.py__call__   s    
zInstallAction.__call__)N)__name__
__module____qualname____doc__r   r   r   r   r   r      s   r   c                   C   s   t tS )zReturn the list of VCS choices.)listr   r   r   r   r   choices.   s    r   )r   Z
__future__r   argparser   Zflake8r   r	   Zflake8.mainr   r   installr   Actionr   r   r   r   r   r   <module>   s   