Your IP : 3.135.220.239


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/pyclbr.cpython-312.opt-2.pyc

�

�Q�f�,����	ddlZddlZddlZgd�ZiZGd�d�ZGd�de�ZGd�de�Zdd	�Z	dd
�Z
dd�Zdd�Zdd
�Z
Gd�dej�Zd�Zd�Zedk(re�yy)�N)�
readmodule�
readmodule_ex�Class�Functionc��eZdZ	d�Zy)�_Objectc��||_||_||_||_||_||_i|_|�||j|<yy�N)�module�name�file�lineno�
end_lineno�parent�children)�selfrrr
rrrs       �-/opt/alt/python312/lib64/python3.12/pyclbr.py�__init__z_Object.__init__7sL�������	���	����$��������
���$(�F�O�O�D�!��N)�__name__�
__module__�__qualname__r�rrrr5s
��1�	)rrc�*��eZdZ		ddd��fd�Z�xZS)rN�rc�|��t�|�||||||�||_t|t�r||j
|<yyr
)�superr�is_async�
isinstancer�methods)	rrrr
rrrr�	__class__s	        �rrzFunction.__init__Fs>���
�����t�V�Z��H� ��
��f�e�$�#)�F�N�N�4� �%r)NF�rrrr�
__classcell__�r!s@rrrDs���=�',�*�<@�*�*rrc�*��eZdZ		ddd��fd�Z�xZS)rNrc�R��t�|�||||||�|xsg|_i|_yr
)rrr )	rrr�super_r
rrrr!s	        �rrzClass.__init__Ps,���
�����t�V�Z��H��\�r��
���rr
r"r$s@rrrNs���'���,0��rrc	�P�	t|j||j||||��S)N)rrr)rrr
)�ob�	func_namerrrs     r�_nest_functionr+Ys+��0��B�I�I�y�"�'�'�6���Z�I�Irc	�P�	t|j|||j|||��S)N�rr)rrr
)r)�
class_namerrrs     r�_nest_classr/^s)��-�����J��r�w�w���z�3�3rc��	i}t||xsg�j�D]\}}t|t�s�|||<�|Sr
)�_readmodule�itemsrr)r�path�res�key�values     rrrdsJ���

�C�!�&�$�*�"�5�;�;�=�
��U��e�U�#��C��H�>��Jrc�$�	t||xsg�Sr
)r1)rr3s  rrrps����v�t�z�r�*�*rc���	|�|�d|��}n|}|tvr	t|Si}|tjvr
|�|t|<|S|jd�}|dk\rQ|d|}||dzd}t	|||�}|�|�d|��}d|vrtdj
|���t	||d|�Sd}	|�|}
n|tjz}
tjj||
�}|�td|��|���|t|<|j�|j|d<	|jj|�}|�|S|jj!|�}
t#|||
|||�S#tt
f$r|cYSwxYw)N�.r��__path__zNo package named {}zno module named )r)�_modules�sys�builtin_module_names�rfindr1�ImportError�formatr3�	importlib�util�_find_spec_from_path�ModuleNotFoundError�submodule_search_locations�loader�
get_source�AttributeError�get_filename�_create_tree)rr3�	inpackage�
fullmodule�tree�i�package�	submoduler�f�search_path�spec�source�fnames              rr1r1zs������ )�6�2�
��
��X���
�#�#��D���)�)�)�i�.?�������	���S��A��A�v���!�*���1�Q�3�4�L�	��W�d�I�6��� �!*�G�4�G��V�#��3�:�:�7�C�D�D��9�f�Z�&8�'�B�B�	
�A������S�X�X�o���>�>�.�.�z�;�G�D��|�!�$4�Z�N�"C�*�U�U��H�Z���&�&�2��:�:��Z������'�'�
�3��
�>��K��K�K�$�$�Z�0�E��
�D�%���y�I�I��
�K�(�����s�E"�"E6�5E6c�6�eZdZd�Zd�Zdd�d�Zd�Zd�Zd�Zy	)
�_ModuleBrowserc�X�||_||_||_||_||_g|_yr
)r3rNr
rrL�stack)rrr3r
rNrLs      rrz_ModuleBrowser.__init__�s,����	���	���	����"�����
rc	��g}|jD]�}tj|�}||jvr|j	|j|��Et|j
d�x}�dkDr8|�^}}}|tvs�s|j	t|j||����|j	|���|jr|jdnd}	t|j|j||j|j|	|j��}|	�||j|j<|jj	|�|j!|�|jj#�y)Nr9r:���r-)�bases�ast�unparserN�append�len�splitr<�getrZrrrr
rr�
generic_visit�pop)
r�noder]�baser�names�_r�class_rs
          r�visit_ClassDefz_ModuleBrowser.visit_ClassDef�s'�����J�J�D��;�;�t�$�D��t�y�y� ����T�Y�Y�t�_�-��d�j�j��o�-�U�.��2�&+�"��F�F��X�%��L�L��&�!1�!5�!5�f�d�!C�D����T�"��$(�:�:����B��4���t�{�{�D�I�I�u�d�i�i����$����B���>�#)�D�I�I�d�i�i� ��
�
���&�!����4� ��
�
���rF�rc	��|jr|jdnd}t|j|j|j|j
|||j��}|�||j|j<|jj|�|j|�|jj�y)Nr\r)rZrrrr
rrrNr`rdre)rrfrr�functions     r�visit_FunctionDefz _ModuleBrowser.visit_FunctionDef�s���#'�:�:����B��4���D�K�K����D�I�I�t�{�{�"�H����J���>�#+�D�I�I�d�i�i� ��
�
���(�#����4� ��
�
���rc�*�|j|d��y)NTrl)ro)rrfs  r�visit_AsyncFunctionDefz%_ModuleBrowser.visit_AsyncFunctionDef�s�����t�d��3rc��|jdk7ry|jD]/}		t|j|j|j
��1y#t$rt|jg�Y�$wxYw#ttf$rY�iwxYw)Nr)�
col_offsetrhr1rr3rLr@�SyntaxError)rrfrs   r�visit_Importz_ModuleBrowser.visit_Import�sy���?�?�a����j�j�F�
�1�����T�Y�Y����G��!��#�1�����R�0�1����-�
��
�s)�+A�A2�/A5�1A2�2A5�5B�Bc� �|jdk7ry	d|jz}|jr||jz
}t||j|j
�}|jD]�}|j|vr5||j|j|jxs|j<�F|jdk(s�V|j�D]&\}}|jd�r�||j|<�(��y#ttf$rYywxYw)Nrr9�*ri)rs�levelrr1r3rLr@rtrhrrN�asnamer2�
startswith)rrfrr�import_name�import_values      r�visit_ImportFromz_ModuleBrowser.visit_ImportFrom�s����?�?�a���	��4�:�:�%�F��{�{��$�+�+�%�� �����D�N�N�C�F��J�J�D��y�y�F�"�6<�T�Y�Y�6G��	�	�$�+�+�2����3����c�!�17����-�K��"�-�-�c�2� �-9�D�I�I�k�*�2@�	���[�)�	��	�s�AC;�;D
�D
N)	rrrrrkrorqrur}rrrrXrX�s%����238��4�
�:rrXc��t|||||�}|jtj|��|jSr
)rX�visitr^�parserN)rMr3rVrUrNrL�mbrowsers       rrKrK
s3���j�$��t�Y�G�H��N�N�3�9�9�V�$�%��=�=�rc�&�	ddl}	tjd}|jj|�r\|jj
|�g}|jj|�}|j�jd�r|dd}ng}t||�}d�}t|j�|d��}d}|�rA|j�}t|t�r�$t!|d	�sd|_t|t$�rRt|j&j�|d��}|D]}	|j"|z|	_�|j)|�t|t*�rIt-d
j/d|j"z|j0|j2|j4��nMt|t6�r=t-dj/d|j"z|j0|j4��|r��@yy#t}Y���xYw)
Nrr:z.py���c��t|dd�S)Nrr)�getattr)�as r�<lambda>z_main.<locals>.<lambda>"s
��7�1�h��2rT)r5�reverse��indentz{}class {} {} {}� z{}def {} {})�osr=�argv�__file__r3�exists�dirname�basename�lower�endswithr�sorted�valuesrer�list�hasattrr�rr�extendr�printrArrrr)
r��modr3rN�
lineno_key�objs�indent_level�obj�new_objsr)s
          r�_mainr�s���E�
���h�h�q�k��
�w�w�~�~�c��������$�%���g�g���s�#���9�9�;����&��c�r�(�C�����d�#�D�2�J��$�+�+�-�Z��>�D��L�
��h�h�j���c�4� ���s�H�%��C�J��c�7�#��c�l�l�1�1�3�",�d�<�H����J�J��5��	���K�K��!��c�5�!��$��6�#��
�
�*�C�H�H�c�i�i����L�
N�
��X�
&��-�&�&�s�S�Z�Z�'7����3�:�:�N�O�%�����s�H�H�__main__)Fr
)r^r=�importlib.utilrB�__all__r<rrrr+r/rrr1�NodeVisitorrXrKr�rrrr�<module>r�s���)�V�
��
>��
��)�)�*�w�*��G��I�
3�
�+�=J�@P:�S�_�_�P:�f�$P�L�z��	�G�r

?>