
    e                        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  G d dej                        Z
 G d d	ej                        Zy)
zDeprecated option actions.    )annotationsN)Sequence)Anyc                       e Zd ZdZ	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZ	 d	 	 	 	 	 	 	 	 	 ddZ xZS )_OldNamesActionz3Store action that also sets the value to old names.c                L    |sJ || _         t        | 	  ||d||||||	|

       y N   )	old_namessuper__init__)selfoption_stringsdestnargsconstdefaulttypechoicesrequiredhelpmetavarr   	__class__s               C/usr/lib/python3/dist-packages/pylint/config/deprecation_actions.pyr   z_OldNamesAction.__init__   ?     y"	
    c                    t        |t              sJ t        || j                  |d          | j                  D ]  }t        |||d           y )Nr   )
isinstancelistsetattrr   r   )r   parser	namespacevaluesoption_stringold_names         r   __call__z_OldNamesAction.__call__1   sK     &$'''	499fQi0 	4HIx3	4r   	NNNNNF r(   N)r   Sequence[str]r   strr   Noner   r+   r   r+   r   r+   r   r+   r   boolr   r*   r   r*   r   list[str] | Nonereturnr+   N
r!   zargparse.ArgumentParserr"   zargparse.Namespacer#   zstr | Sequence[Any] | Noner$   z
str | Noner.   r+   __name__
__module____qualname____doc__r   r&   __classcell__r   s   @r   r   r      s    = &*
%
 
 	

 
 
 
 
 
 
 
 $
 

D %)
4'
4 &
4 +	
4
 "
4 

4r   r   c                       e Zd ZdZ	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZ	 d	 	 	 	 	 	 	 	 	 ddZ xZS )_NewNamesActionzDStore action that also emits a deprecation warning about a new name.c                L    |sJ || _         t        | 	  ||d||||||	|

       y r	   )	new_namesr   r   )r   r   r   r   r   r   r   r   r   r   r   r;   r   s               r   r   z_NewNamesAction.__init__A   r   r   c                    t        |t              sJ t        || j                  |d          t	        j
                  | j                  d    ddj                  | j                         dt        d       y )Nr   zK has been deprecated. Please look into using any of the following options: z, .   )
stacklevel)
r   r   r    r   warningswarnr   joinr;   DeprecationWarning)r   r!   r"   r#   r$   s        r   r&   z_NewNamesAction.__call__^   sk     &$'''	499fQi0""1%& '33799T^^3L2MQP		
r   r'   )r   r)   r   r*   r   r+   r   r+   r   r+   r   r+   r   r+   r   r,   r   r*   r   r*   r;   r-   r.   r+   r/   r0   r1   r7   s   @r   r9   r9   >   s    N &*
%
 
 	

 
 
 
 
 
 
 
 $
 

D %)
'
 &
 +	

 "
 

r   r9   )r5   
__future__r   argparser@   collections.abcr   typingr   _StoreActionr   r9    r   r   <module>rJ      s>    ! "   $ *4h++ *4Z.
h++ .
r   