Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/pydocstyle/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/pydocstyle/__pycache__/violations.cpython-311.pyc

�

�܋f{0��n
�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZddl
mZddlmZd	Zed
gd���ZGd�d
��ZGd�d��Ze�dd��Ze�dd��Ze�dd��Ze�dd��Ze�dd��Ze�dd��Ze�dd��Ze�dd��Ze�d d!��Ze�d"d#��Z e �d$d%d&��Z!e �d'd(d&��Z"e �d)d*d&��Z#e �d+d,d&��Z$e �d-d.d&��Z%e �d/d0d&��Z&e �d1d2��Z'e �d3d4��Z(e �d5d6��Z)e �d7d8��Z*e �d9d:��Z+e �d;d<d&��Z,e �d=d>��Z-e �d?d@��Z.e �dAdBdC��Z/e �dDdEdF��Z0e�dGdH��Z1e1�dIdJdK��Z2e1�dLdM��Z3e1�dNdO��Z4e�dPdQ��Z5e5�dRdSdT��Z6e5�dUdVdW��Z7e5�dUdXdY��Z8e5�dZd[��Z9e5�d\d]d^��Z:e5�d_d`��Z;e5�dadbd^��Z<e5�dcddd^��Z=e5�dedfdC��Z>e5�dgdhdC��Z?e5�didjdk��Z@e5�dldmdC��ZAe5�dndodC��ZBe5�dpdqdC��ZCe5�drdsdC��ZDe5�dtdudC��ZEe5�dvdwdT��ZFe5�dxdyd^��ZGe5�dzd{d|��ZHe5�d}d~��ZIe5�dd���ZJGd��d�eK��ZLeMe�N����ZOeLeOhd��z
eOhd��z
eOhd��z
d����ZPd�S)�zDocstring violation definition.�)�
namedtuple)�partial)�	dropwhile)�Any�Callable�Iterable�List�Optional�)�
Definition��is_blank)�Error�
ErrorRegistry�conventions�ErrorParams)�code�
short_desc�contextc
���eZdZdZdZdZdedededeeddf
d	�Zd
e	deddfd�Z
ed
���Zed���Z
edefd���Zedefd���Zdefd�Zdefd�Zdddefd�ZdS)rzError in docstring style.Frrr�
parameters�returnNc�Z�||_||_||_||_d|_d|_dS)zYInitialize the object.

        `parameters` are specific to the created error.

        N)rrrr�
definition�explanation)�selfrrrrs     �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pydocstyle/violations.py�__init__zError.__init__s5����	�$������$�����������rrc�"�||_||_dS)z+Set the source code context for this error.N)rr)rrrs   r�set_contextzError.set_context+s��$���&����rc�$�|jjjS�N)r�module�name�rs r�<lambda>zError.<lambda>0s��T�_�%;�%@�rc��|jjSr#)r�error_linenor&s rr'zError.<lambda>1s����!=�rc�p�|j�d|j��}|j�|jj|j�}|d|�d�z
}|S)z(Return the message to print to the user.z: Nz (�))rrr�formatr)r�ret�specific_error_msgs   r�messagez
Error.message3sS����/�/�d�o�/�/���<�#�!4���!4�d�o�!F���-�*�-�-�-�-�C��
rc���|j�dSd}|jj�d���}|jj}t	tt	t
tt|����������}tt|t|��z����}d|�d�}t|��D]5\}}|rd|z}||�||z|��z
}|dkr|d	z
}n�6|S)
z,Return the source code lines for this error.N�T)�keependsz{:z}:{}� �z        ...
)r�source�
splitlines�start�list�reversedrr�len�str�	enumerater,)	rr5�lines�offset�lines_stripped�
numbers_width�line_format�n�lines	         rr=zError.lines<s���?�"��2�����&�1�1�4�1�@�@����&����T�)�H�h�u�o�o�>�>�?�?�@�@�
�
���C���^�)<�)<� <�=�=�>�>�
�2�M�2�2�2�� ��0�0�	�	�G�A�t��
"��T�z���k�(�(��V��T�:�:�:�F��1�u�u��/�)������
rc�6���jr<d�d��j�d��D�����_d}�jr
�jr|dz
}n'�jr
�js|dz
}n�jr�js|dz
}|jd	i�fd�dD����S)
N�
c3�8K�|]}t|���|V��dSr#r
)�.0�ls  r�	<genexpr>z Error.__str__.<locals>.<genexpr>TsA����)�)��x��{�{�)��)�)�)�)�)�)rz1{filename}:{line} {definition}:
        {message}z

{explanation}

{lines}
z


{lines}
z

{explanation}

c�2��i|]}|t�|����S�)�getattr)rGr%rs  �r�
<dictcomp>z!Error.__str__.<locals>.<dictcomp>_s5���
�
�
���g�d�D�)�)�
�
�
r)�filenamerCrr/rr=rK)r�join�splitr5�explainr,)r�templates` r�__str__z
Error.__str__Rs������	�#�y�y�)�)��+�1�1�$�7�7�)�)�)� � �D��H���;�	0�4�<�	0��8�8�H�H�
�[�	0���	0���'�H�H�
�\�	0�$�+�	0��/�/�H��x��
�
�
�
�
�
��
�
�
�
�
�	
rc� �t|��Sr#)r;r&s r�__repr__zError.__repr__ls���4�y�y�r�otherc�>�|j|jf|j|jfkSr#)rNrC)rrVs  r�__lt__zError.__lt__os���
�t�y�)�U�^�U�Z�,H�H�Hr)�__name__�
__module__�__qualname__�__doc__rQr5r;rrrr!�propertyrNrCr/r=rSrU�boolrXrKrrrrsk������#�#��G�
�F� �� �� ��	 �
�c�]� �
�
 � � � �&'�j�'�s�'�t�'�'�'�'�
�x�@�@�A�A�H��8�=�=�>�>�D�
�������X����s�����X��*
��
�
�
�
�4�#�����I�G�I��I�I�I�I�I�Irrc��eZdZdZgZGd�d��Zedededefd���Zede	efd���Z
edefd	���Zd
S)rz1A registry of all error codes, divided to groups.c�l�eZdZdZdededdfd�Z	ddeded	eedeeege	ffd
�Z
dS)�ErrorRegistry.ErrorGroupz#A group of similarly themed errors.�prefixr%rNc�0�||_||_g|_dS)z�Initialize the object.

            `Prefix` should be the common prefix for errors in this group,
            e.g., "D1".
            `name` is the name of the group (its subject).

            N)rbr%�errors)rrbr%s   rrz!ErrorRegistry.ErrorGroup.__init__{s��!�D�K��D�I��D�K�K�Kr�
error_code�
error_desc�
error_contextc��t|||��}ttg|�R�}|j�|��|S)z9Create an error, register it to this group and return it.)rrrrd�append)rrerfrg�error_params�factorys      r�create_errorz%ErrorRegistry.ErrorGroup.create_error�sE��'�z�:�}�M�M�L��e�3�l�3�3�3�G��K���|�,�,�,��Nrr#)rYrZr[r\r;rr
rrrrlrKrr�
ErrorGroupraxs�������1�1�
	�3�
	�c�
	�d�
	�
	�
	�
	� ,0�		�	��	��	�$�C�=�		�
�x��}�o�u�,�
-�	�	�	�	�	�	rrmrbr%rc�f�|�||��}|j�|��|S)z'Create a new error group and return it.)rm�groupsri)�clsrbr%�groups    r�create_groupzErrorRegistry.create_group�s2�����v�t�,�,���
���%� � � ��rc#�DK�|jD]}|jD]}|jV���dS)zYield all registered codes.N)rordr)rprq�errors   r�get_error_codeszErrorRegistry.get_error_codes�sJ�����Z�	!�	!�E���
!�
!���j� � � � �
!�	!�	!rc��td�|jD����}dd|dzzzdz}d|dzdzzd	z}d
}|jD]�}||z
}||z
}|dd|j�d��|dz��zd	zz
}||z
}|jD]K}||z
}|d|j�d��zd
z|j�|dz��zd	zz
}�L��||z
}|S)z;Output the registry as reStructuredText, for documentation.c3�RK�|]"}|jD]}t|j��V���#dSr#)rdr:r)rGrqrts   rrIz'ErrorRegistry.to_rst.<locals>.<genexpr>�sZ����
�
����
�
��
�� �!�!�
�
�
�
�
�
�
rz+------+�-�z+
�|�	r3z|
r1z**�z| r)�maxror%�centerrdrr�ljust)rp�max_len�sep_line�
blank_line�tablerqrts       r�to_rstzErrorRegistry.to_rst�sT���
�
���
�
�
�
�
��
'���!��)<�<�u�D���G�a�K�3�.�.��6�
����Z�
	�
	�E��X��E��Z��E��S�.��
�.�.�.�5�5�g��k�B�B�B�U�J�J�E��Z��E���
�
����!�����j�'�'��*�*�+����&�,�,�W�q�[�9�9�:��	����
�	�����rN)rYrZr[r\rorm�classmethodr;rrrrur�rKrrrrss�������;�;�
�F���������:��#��S��Z�����[���!���
�!�!�!��[�!���s�����[���rr�D1zMissing Docstrings�D100z"Missing docstring in public module�D101z!Missing docstring in public class�D102z"Missing docstring in public method�D103z$Missing docstring in public function�D104z#Missing docstring in public package�D105z!Missing docstring in magic method�D106z(Missing docstring in public nested class�D107zMissing docstring in __init__�D2zWhitespace Issues�D200z5One-line docstring should fit on one line with quotesz	found {0}�D201z0No blank lines allowed before function docstring�D202z/No blank lines allowed after function docstring�D203z,1 blank line required before class docstring�D204z+1 blank line required after class docstring�D205z:1 blank line required between summary line and description�D206z2Docstring should be indented with spaces, not tabs�D207zDocstring is under-indented�D208zDocstring is over-indented�D209z@Multi-line docstring closing quotes should be on a separate line�D210z1No whitespaces allowed surrounding docstring text�D211z-No blank lines allowed before class docstring�D212z;Multi-line docstring summary should start at the first line�D213z<Multi-line docstring summary should start at the second line�D214zSection is over-indentedz{0!r}�D215z"Section underline is over-indentedzin section {0!r}�D3z
Quotes Issues�D300zUse """triple double quotes"""zfound {0}-quotes�D301z*Use r""" if any backslashes in a docstring�D302z+Deprecated: Use u""" for Unicode docstrings�D4zDocstring Content Issues�D400z#First line should end with a periodz	not {0!r}�D401z'First line should be in imperative moodzperhaps '{0}', not '{1}'z7First line should be in imperative mood; try rephrasingzfound '{0}'�D402z3First line should not be the function's "signature"�D403z;First word of the first line should be properly capitalizedz{0!r}, not {1!r}�D404z0First word of the docstring should not be `This`�D405z+Section name should be properly capitalized�D406z&Section name should end with a newline�D407z&Missing dashed underline after section�D408zDSection underline should be in the line following the section's name�D409z5Section underline should match the length of its namez1Expected {0!r} dashes in section {1!r}, got {2!r}�D410z Missing blank line after section�D411z!Missing blank line before section�D412z?No blank lines allowed between a section header and its content�D413z%Missing blank line after last section�D414zSection has no content�D415zHFirst line should end with a period, question mark, or exclamation point�D416z$Section name should end with a colon�D417z.Missing argument descriptions in the docstringz;argument(s) {0} are missing descriptions in {1!r} docstring�D418zGFunction/ Method decorated with @overload shouldn't contain a docstring�D419zDocstring is emptyc��eZdZdedefd�ZdS)�AttrDict�itemrc��||Sr#rK)rr�s  r�__getattr__zAttrDict.__getattr__�s���D�z�rN)rYrZr[r;rr�rKrrr�r��s6���������������rr�>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�>r�r�r�r�r�r�r�r�r�r�r�r�)�pep257�numpy�googleN)Qr\�collectionsr�	functoolsr�	itertoolsr�typingrrrr	r
�parserr�utilsr�__all__rrrrr�D1xxrlr�r�r�r�r�r�r�r��D2xxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��D3xxr�r�r��D4xxr�r��D401br�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��dictr��setru�
all_errorsrrKrr�<module>r�s���%�%�"�"�"�"�"�"�������������:�:�:�:�:�:�:�:�:�:�:�:�:�:�������������
3���j��(I�(I�(I�J�J��_I�_I�_I�_I�_I�_I�_I�_I�DJ�J�J�J�J�J�J�J�Z�!�!�$�(<�=�=�����
�(�������
�'�������
�(�������
�*�������
�)�������
�'�������
�.�������
�#����
�!�!�$�(;�<�<�����
�>�����
���
�6�����
���
�5�����
���
�2�����
���
�1�����
���
�@�����
���
�8�������
�!�������
� �������
�F�������
�7�������
�3�����
���
�A�������
�B�������
������
���
�(������!�!�$��8�8�����
�$�����
���
�0�������
�1����
�!�!�$�(B�C�C�����
�)�����
���
�-�����
	
���
�=��	�	��
���
�:�������
�A�����
���
�6�������
�1�����
���
�,�����
���
�,�����
���
�K�����
���
�;�7����
���
�&�����
���
�'�����
���
�E�����
���
�+�����
���
������
���
�	%��
������
�*�����
���
�4�A�������
�N�������
����������t����
�S��.�.�0�0�
1�
1�
��h��
�
�
�
�*�

�

�

�
��

�

�

�
�E1�1�3�3���r

Hacked By AnonymousFox1.0, Coded By AnonymousFox