AlkantarClanX12

Your IP : 18.117.70.64


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/config/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/config/__pycache__/utils.cpython-311.pyc

�

�܋f�$�	�<�UdZddlmZddlZddlZddlmZmZddlm	Z	ddl
mZmZddl
mZmZddlmZmZmZmZmZmZdd	lmZdd
lmZerddlmZd.d�Zd/d�Zd0d�Zd0d�Z d0d�Z!d0d�Z"d0d�Z#d0d�Z$d ed!fd e d"fd e!dfd e"d#fd$e#d"fd$e#d%fd$e$d&fd'�Z%d(e&d)<d1d-�Z'dS)2z1Utils for arguments/options parsing and handling.�)�annotationsN)�Callable�Sequence)�Path)�
TYPE_CHECKING�Any)�
extensions�utils)�_CallableArgument�_ExtendArgument�_StoreArgument�_StoreNewNamesArgument�_StoreOldNamesArgument�_StoreTrueArgument)�_CallbackAction)�ArgumentPreprocessingError)�Run�opt�str�optdict�dict[str, Any]�return�{_StoreArgument | _StoreTrueArgument | _CallableArgument | _StoreOldNamesArgument | _StoreNewNamesArgument | _ExtendArgumentc�(	�d|vr!d|vrtjd|��t��d|��g}d|vr|d|d��gz
}|�dd��}|d	kret	|||�d
d��|�dd
��|�dd��|�dd�����St|t��s�t|t��rzt|||�dd
��|�di��|�dd��|�dd��|�dd�����S	|d
}n/#t$r"tjd|��t��d}YnwxYw|dkr�t|||�gn||d|�dd��|�dd
��|�dd
��|�dd��|�dd��|�dd����
�
Sd|v�r@d|dvr�t|||d|�dd��|�dd
��|�dd
��|�dd��|�di��|�dd����	�	Sd|dvr�t|||d|�dd��|�dd
��|�dd
��|�dd��|�di��|�dd����	�	Sd|vr�t|||d|�dd��|�dd
��|�dd
��|�dd��d|dgi|�dd����	�	St||||d|�dd��|�dd
��|�dd
��|�dd��|�dd����	�	S)z1Convert an optdict to an Argument class instance.�level�hidez|The 'level' key in optdicts has been deprecated. Use 'hide' with a boolean to hide an option from the help message. optdict=z--�short�-�action�store�
store_true�defaultT�help�F�groupN)�flagsrr"�arg_help�	hide_help�section�kwargs�metavar)r&rr'r*r(r)r+z�An option dictionary should have a 'default' key to specify the option's default value. This key will be required in pylint 3.0. It is not required for 'store_true' and callable actions. optdict=�extend�type�choices�dest)
r&rr"�arg_typer.r'r+r(r)r/�	old_names)	r&r"r0r.r'r+r(r*r)�	new_names)	r&rr"r0r.r'r+r(r))�warnings�warn�DeprecationWarning�getr�
isinstancer�
issubclassrr�KeyErrorrrrr
)rrr&rr"s     �d/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/config/utils.py�_convert_option_to_argumentr;s����'���f�G�3�3��
�
!��
!�
!�
�		
�	
�	
��#�Z�Z�L�E��'���
�(�g�g�&�(�(�)�)���[�[��7�
+�
+�F�
����!����K�K�	�4�0�0��[�[���,�,��k�k�&�%�0�0��K�K���.�.�

�
�
�	
��f�c�"�"�	
�z�&�/�'J�'J�	
� ����[�[���,�,��;�;�x��,�,��k�k�&�%�0�0��K�K���.�.��K�K�	�4�0�0�
�
�
�	
�
��)�$���������
�
!��
!�
!�
�	
�	
�	
����������������!�/�B�B�w��V�_��K�K�	�4�0�0��[�[���,�,��K�K�	�2�.�.��k�k�&�%�0�0��K�K���.�.����V�T�*�*�
�
�
�	
��7����'�(�+�+�+�)��� ������I�t�4�4� ���V�R�0�0����I�r�2�2�!�+�+�f�e�4�4��{�{�8�R�0�0����G�T�2�2�
�
�
�

��'�(�+�+�+�)��� ������I�t�4�4� ���V�R�0�0����I�r�2�2�!�+�+�f�e�4�4��{�{�8�R�0�0����G�T�2�2�
�
�
�

�����%����V�_��K�K�	�4�0�0��[�[���,�,��K�K�	�2�.�.��k�k�&�%�0�0��'�&�/�!2�3��K�K���.�.�

�

�

�
	
�����������I�t�,�,����V�R�(�(����I�r�*�*��+�+�f�e�,�,����G�T�*�*�
�
�
�
s�%E.�.)F�F�valuerc�~�t|ttf��rd�d�|D����St|tj��rt
|j��St|t��r1d�d�|�	��D����St
|��S)z%Parse rich (toml) types into strings.�,c3�4K�|]}t|��V��dS)N)�_parse_rich_type_value)�.0�is  r:�	<genexpr>z)_parse_rich_type_value.<locals>.<genexpr>�s+����A�A�a�.�q�1�1�A�A�A�A�A�A�c3�*K�|]\}}|�d|��V��dS)�:N�)rA�k�vs   r:rCz)_parse_rich_type_value.<locals>.<genexpr>�s0����=�=�t�q�!�1�
�
�q�
�
�=�=�=�=�=�=rD)
r7�list�tuple�join�re�Patternr�pattern�dict�items)r<s r:r@r@�s����%�$���'�'�B��x�x�A�A�5�A�A�A�A�A�A��%���$�$�"��5�=�!�!�!��%����>��x�x�=�=�u�{�{�}�}�=�=�=�=�=�=��u�:�:�rD�runr�
str | None�Nonec�,�|�J�t|��dS)zhExecute arbitrary code from the init_hook.

    This can be used to set the 'sys.path' for example.
    N)�exec�rRr<s  r:�
_init_hookrX�s��
������K�K�K�K�KrDc��|�J�||_dS)zSet the rcfile.N)�_rcfilerWs  r:�_set_rcfiler[���������C�K�K�KrDc��|�J�||_dS)zSet the output.N)�_outputrWs  r:�_set_outputr_�r\rDc�f�|�J�|j�tj|����dS)z,Add plugins to the list of loadable plugins.N)�_pluginsr,r
�_splitstriprWs  r:�_add_pluginsrc�s5�������L����)�%�0�0�1�1�1�1�1rDc��|�J�d|_dS)NT)�verboserWs  r:�_set_verbose_moderf�s���=�=�=��C�K�K�KrDc��|�J�ttj��j���D]T}|jdkrG|j�d��s-d|j��}||jvr|j�	|���UdS)zEnable all extensions.Nz.py�_zpylint.extensions.)
rr	�__file__�parent�iterdir�suffix�stem�
startswithra�append)rRr<�filename�extension_names    r:�_enable_all_extensionsrr�s����=�=�=���,�-�-�4�<�<�>�>�4�4���?�e�#�#�H�M�,D�,D�S�,I�,I�#�A�(�-�A�A�N��S�\�1�1���#�#�N�3�3�3��	4�4rDT���F��	)z--init-hookz--rcfilez--outputz--load-pluginsz	--verbosez-vz--enable-all-extensionsz>dict[str, tuple[bool, Callable[[Run, str | None], None], int]]�PREPROCESSABLE_OPTIONS�args�
Sequence[str]�	list[str]c�,�g}d}|t|��k�r{||}|�d��s|�|��|dz
}�L	|�dd��\}}n#t$r|d}}YnwxYwd}t
���D];\}}	|	d}
|
dkr	||kr|}�|�|d|
���r|}�<|�|�|��|dz
}��t
|\}}}
|rQ|�O|dz
}|t|��ks||�d��rtd|�d����||}n|s|�td|�d	����|||��|dz
}|t|��k��{|S)
z;Pre-process options before full config parsing has started.rr��=NrvzOption z expects a valuez doesn't expect a value)�lenrnro�split�
ValueErrorrxrQr)rRry�processed_argsrB�argument�optionr<�matched_option�option_name�data�to_match�takearg�cbrhs              r:�_preprocess_optionsr��s�� "�N�	�A�
�c�$�i�i�-�-���7���"�"�3�'�'�	��!�!�(�+�+�+�
��F�A��	+�$�N�N�3��2�2�M�F�E�E���	+�	+�	+�$�d�E�F�F�F�	+������!7�!=�!=�!?�!?�	-�	-��K���A�w�H��1�}�}��[�(�(�%0�N���"�"�;�y��y�#9�:�:�
-�!,����!��!�!�(�+�+�+�
��F�A��/��?����Q��	X�u�}�
��F�A��C��I�I�~�~��a��!3�!3�C�!8�!8�~�0�1S�6�1S�1S�1S�T�T�T���G�E�E��	X�U�.�,�-V�v�-V�-V�-V�W�W�W�
��3�����	�Q���K�c�$�i�i�-�-�N�s�A,�,A=�<A=)rrrrrr)r<rrr)rRrr<rSrrT)rRrryrzrr{)(�__doc__�
__future__rrMr3�collections.abcrr�pathlibr�typingrr�pylintr	r
�pylint.config.argumentrrr
rrr�pylint.config.callback_actionsr�pylint.config.exceptionsr�pylint.lint.runrr;r@rXr[r_rcrfrrrx�__annotations__r�rGrDr:�<module>r�sO��
8�7�7�"�"�"�"�"�"�	�	�	�	�����.�.�.�.�.�.�.�.�������%�%�%�%�%�%�%�%�$�$�$�$�$�$�$�$�����������������;�:�:�:�:�:�?�?�?�?�?�?��$�#�#�#�#�#�#�u�u�u�u�p����������������2�2�2�2�����
4�4�4�4�*�*�a�(��{�A�&��{�A�&��\�1�-��*�A�.��#�Q�
'� %�'=�q�A�)�������6,�,�,�,�,�,rD