Hacked By AnonymousFox

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

�

�܋f�����ddlmZddlZddlZddlZddlZddlmZmZddl	m	Z	ddl
mZddlm
Z
ddlmZdd�Zd d�Zd!d�Zd"d�Zejd#d���Zejd$d���Zd%d�ZdS)&�)�annotationsN)�Iterator�Sequence)�datetime)�Path)�PYLINT_HOME��discover_package_path�ex�	Exception�filepath�str�crash_file_path�returnrc
���tt��tj���t|����z���}t|d���5}|���}ddd��n#1swxYwYd}|�	��sd}|d|�d|�d|j
j�d�z
}|tj
��z
}|d	z
}	t|d
d���5}|�|��ddd��n#1swxYwYn<#t$r/}t!d|�d|�d
|�d�t"j���Yd}~nd}~wwxYw|S)N�utf8)�encoding�z�First, please verify that the bug is not already filled:
https://github.com/PyCQA/pylint/issues/

Then create a new crash issue:
https://github.com/PyCQA/pylint/issues/new?assignees=&labels=crash%2Cneeds+triage&template=BUG-REPORT.yml

z
Issue title:
Crash ``z�`` (if possible, be more specific about what made pylint crash)
Content:
When parsing the following file:

<!--
 If sharing the code is not an option, please state so,
 but providing only the stacktrace would still be helpful.
 -->

```python
z
```

pylint crashed with a ``z*`` and with the following stacktrace:
```
z```
�az0Can't write the issue template for the crash in z because of: 'z'
Here's the content anyway:
�.)�file)rrr�now�strftimer�resolve�open�read�exists�	__class__�__name__�	traceback�
format_exc�writer�print�sys�stderr)rr
r�issue_template_path�f�file_content�template�excs        �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/lint/utils.py�prepare_crash_reportr,sL���[���H�L�N�N�3�3�C��4H�4H�I�I�I�
�g�i�i��
�h��	(�	(�	(� �A��v�v�x�x�� � � � � � � � � � � ���� � � � ��H��%�%�'�'����
��
������ ��.�!����H�&
�	�$�&�&�&�H����H�
�
�%�s�V�
<�
<�
<�	��
�G�G�H����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	����
�
�
�
�
L�?R�
L�
L��
L�
L�@H�
L�
L�
L���	
�	
�	
�	
�	
�	
�	
�	
�	
�����
�����sN�,B
�
B�B�%D%�7D�
D%�D�D%� D�!D%�%
E�/%E�Er&c��d|�d|�d�S)NzFatal error while checking 'zs'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in 'z'.�)r
r&s  r+�get_fatal_error_messager/Ds0��	W�x�	W�	W�?R�	W�	W�	W���args�
Sequence[str]�	list[str]c�l�tjdtd���td�|D����S)Na_patch_sys_path has been deprecated because it relies on auto-magic package path discovery which is implemented by get_python_path that is deprecated. Use _augment_sys_path and pass additional sys.path entries as an argument obtained from discover_package_path.���
stacklevelc�.�g|]}t|g����Sr.r	��.0�args  r+�
<listcomp>z#_patch_sys_path.<locals>.<listcomp>Vs#��M�M�M��3�C��<�<�M�M�Mr0)�warnings�warn�DeprecationWarning�_augment_sys_path�r1s r+�_patch_sys_pathrBLsG���M�	!�	��
�����M�M��M�M�M�N�N�Nr0�additional_pathsc��ttj��}g}t��}|D]0}||vr*|�|��|�|���1|tjztjdd�<|S)N)�listr$�path�set�append�add)rC�original�changes�seen�additional_paths     r+r@r@Ysw���C�H�~�~�H��G��5�5�D�+�&�&���$�&�&��N�N�?�+�+�+��H�H�_�%�%�%���C�H�$�C�H�Q�Q�Q�K��Or0�Iterator[None]c#�K�tjdtd���td�|D����5dV�ddd��dS#1swxYwYdS)aFPrepare 'sys.path' for running the linter checks.

    Within this context, each of the given arguments is importable.
    Paths are added to 'sys.path' in corresponding order to the arguments.
    We avoid adding duplicate directories to sys.path.
    `sys.path` is reset to its original value upon exiting this context.
    afix_import_path has been deprecated because it relies on auto-magic package path discovery which is implemented by get_python_path that is deprecated. Use augmented_sys_path and pass additional sys.path entries as an argument obtained from discover_package_path.r5r6c�.�g|]}t|g����Sr.r	r9s  r+r<z#fix_import_path.<locals>.<listcomp>xs#��L�L�L��2�3��;�;�L�L�Lr0N)r=r>r?�augmented_sys_pathrAs r+�fix_import_pathrRfs�����
�M�	!�	��
����
�L�L�t�L�L�L�	M�	M���
������������������������s�A
�
A�Ac#�K�t|��}	dV�|tjdd�<dS#|tjdd�<wxYw)zHAugment 'sys.path' by adding non-existent entries from additional_paths.N)r@r$rF)rCrJs  r+rQrQ|sR����!�!1�2�2�H��
��������������h����������s�*�=�self�other�boolc�>�	|j|�dS#t$rYdSwxYw)z�Checks if self is relative to other.

    Backport of pathlib.Path.is_relative_to for Python <3.9
    TODO: py39: Remove this backport and use stdlib function.
    TF)�relative_to�
ValueError)rTrUs  r+�_is_relative_torZ�s>������%� � ��t�������u�u����s�
�
�)rrr
rrrrr)r
rr&rrr)r1r2rr3)rCr2rr3)r1r2rrN)rCr2rrN)rTrrUrrrV)�
__future__r�
contextlibr$r r=�collections.abcrrr�pathlibr�
pylint.configr�pylint.lint.expand_modulesr
r,r/rBr@�contextmanagerrRrQrZr.r0r+�<module>rbs^��
#�"�"�"�"�"�����
�
�
�
���������.�.�.�.�.�.�.�.�������������%�%�%�%�%�%�<�<�<�<�<�<�.�.�.�.�b����
O�
O�
O�
O�
�
�
�
���������*��������
�
�
�
�
�
r0

Hacked By AnonymousFox1.0, Coded By AnonymousFox