ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/lint/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/lint/__pycache__/parallel.cpython-311.pyc

�

�܋f���.�UddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZddlZddl
mZddlmZddlmZdd	lmZdd
lmZmZ	ddlZn
#e$rdZYnwxYw	ddlmZn
#e$rdZYnwxYwe
rddlmZdad
ed<	d#d$d�Z d%d�Z!d&d�Z"	d#d'd"�Z#dS)(�)�annotationsN)�defaultdict)�Iterable�Sequence)�
TYPE_CHECKING�Any)�	reporters)�_augment_sys_path)�Message)�FileItem)�LinterStats�merge_stats)�ProcessPoolExecutor)�PyLinterzPyLinter | None�_worker_linter�linter�bytes�extra_packages_paths�Sequence[str] | None�return�Nonec���tj|��atsJ�t�t	j����t���|rt|��dSdS)z�Function called to initialize a worker for a Process within a concurrent Pool.

    :param linter: A linter-class (PyLinter) instance pickled with dill
    :param extra_packages_paths: Extra entries to be added to sys.path
    N)�dill�loadsr�set_reporterr	�CollectingReporter�openr
)rrs  �e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/lint/parallel.py�_worker_initializer'sv���Z��'�'�N����>����	� <� >� >�?�?�?��������0��.�/�/�/�/�/�0�0��	file_itemr�etuple[int, str | None, str, str | None, list[Message], LinterStats, int, defaultdict[str, list[Any]]]c�
�tstd���t���t�|��t	t
��}t���D]8}|���}|� ||j�	|���9tj
j}ttj
tj��sJ�tj
���tj�t#jdt&��t)t+j����tj|jtjj|tjtj|fS)Nz!Worker linter not yet initialisedz�In pylint 3.0 the current_name attribute of the linter object should be a string. If unknown it should be initialized as an empty string.)r�RuntimeErrorr�check_single_file_itemr�list�get_checkers�get_map_data�name�append�reporter�messages�
isinstancer	r�reset�current_name�warnings�warn�DeprecationWarning�id�multiprocessing�current_process�filepath�
file_state�	base_name�stats�
msg_status)r!�mapreduce_data�checker�data�msgss     r�_worker_check_single_filer?<sH���@��>�?�?�?��������)�)�)�4�4�4� ��&�&�N�!�.�.�0�0�6�6���#�#�%�%�����7�<�(�/�/��5�5�5���"�+�D��n�-�y�/K�L�L�L�L�L���!�!�#�#�#��"�*��
�J�
�	
�	
�	
�	�?�*�,�,�-�-��#����!�+�����!��	�	r r�all_mapreduce_data�3defaultdict[int, list[defaultdict[str, list[Any]]]]c�V�tt��}|���D]<}|D]7}|���D] \}}||�|���!�8�=|���}|D],}|j|vr!|�|||j���-dS)zJMerges map/reduce data across workers, invoking relevant APIs on checkers.N)rr&�values�items�extendr'r)�reduce_map_data)	rr@�collated_map_reduce_data�linter_data�run_data�checker_namer=�original_checkersr<s	         r�_merge_mapreduce_datarLis���=H��<M�<M��)�0�0�2�2�D�D��#�	D�	D�H�&.�n�n�&6�&6�
D�
D�"��d�(��6�=�=�d�C�C�C�C�
D�	D�
�+�+�-�-��$�T�T���<�3�3�3�
�#�#�F�,D�W�\�,R�S�S�S��	T�Tr �jobs�int�files�Iterable[FileItem]c
���tjt|���}t||t	j|��f���5}|���g}tt��}|�	t|��D]�\}}	}
}}}
}}||j_d|j_
|�|	|
��|D]}|j�|���|�|
��||�|��|xj|zc_��	ddd��n#1swxYwYt'||��t)|jg|z��|_dS)aUse the given linter to lint the files with given amount of workers (jobs).

    This splits the work filestream-by-filestream. If you need to do work across
    multiple files, as in the similarity-checker, then implement the map/reduce mixin functionality.
    )r)�max_workers�initializer�initargsFN)�	functools�partialrrr�dumpsrrr&�mapr?r7r8�_is_base_filestate�set_current_moduler+�handle_messager*r:rLrr9)rrMrOrrS�executor�	all_statsr@�
worker_idx�module�	file_pathr8r,r9r:r;�msgs                 r�check_parallelrb�s����#��1E����K�
��k�T�Z��=O�=O�<Q�
�
�
�,�	����
�
�
��	�
����	� �\�\�3�U�
;�
;�	,�	,�	
���������*3�F��'�38�F��0��%�%�f�i�8�8�8��
4�
4����.�.�s�3�3�3�3����U�#�#�#��z�*�1�1�.�A�A�A�����+����#	,�,�,�,�,�,�,�,�,�,�,�,����,�,�,�,�>�&�"4�5�5�5����~�	�9�:�:�F�L�L�Ls�CD-�-D1�4D1)N)rrrrrr)r!rrr")rrr@rArr)
rrrMrNrOrPrrrr)$�
__future__rrUr0�collectionsr�collections.abcrr�typingrrr�pylintr	�pylint.lint.utilsr
�pylint.messager�
pylint.typingr�pylint.utilsr
rr4�ImportError�concurrent.futuresr�pylint.lintrr�__annotations__rr?rLrb�r r�<module>rqs���
#�"�"�"�"�"�"���������#�#�#�#�#�#�.�.�.�.�.�.�.�.�%�%�%�%�%�%�%�%�����������/�/�/�/�/�/�"�"�"�"�"�"�"�"�"�"�"�"�1�1�1�1�1�1�1�1�������������O�O�O������6�6�6�6�6�6�6���������������%�$�$�$�$�$�$�#'��&�&�&�&�AE�0�0�0�0�0�**�*�*�*�ZT�T�T�T�826�	1;�1;�1;�1;�1;�1;�1;s$�A�A�A�A%�%A/�.A/

Zerion Mini Shell 1.0