OwlCyberSecurity - MANAGER
Edit File: pyclbr.cpython-313.pyc
� ����s�h�,�����������������������������S�r�SSKrSSKrSSKr/�SQr0�r�"�S�S5������r�"�S�S\5������r�"�S�S \5������r SS �jr SS�jrSS�jrSS �jr SS�jr�"�S�S\R������������������5������rS�rS�r\S:X��a��\"�5������� �gg)a��Parse a Python module and describe its classes and functions. Parse enough of a Python file to recognize imports and class and function definitions, and to find out the superclasses of a class. The interface consists of a single function: readmodule_ex(module, path=None) where module is the name of a Python module, and path is an optional list of directories where the module is to be searched. If present, path is prepended to the system search path sys.path. The return value is a dictionary. The keys of the dictionary are the names of the classes and functions defined in the module (including classes that are defined via the from XXX import YYY construct). The values are instances of classes Class and Function. One special key/value pair is present for packages: the key '__path__' has a list as its value which contains the package search path. Classes and Functions have a common superclass: _Object. Every instance has the following attributes: module -- name of the module; name -- name of the object; file -- file in which the object is defined; lineno -- line in the file where the object's definition starts; end_lineno -- line in the file where the object's definition ends; parent -- parent of this object, if any; children -- nested objects contained in this object. The 'children' attribute is a dictionary mapping names to objects. Instances of Function describe functions with the attributes from _Object, plus the following: is_async -- if a function is defined with an 'async' prefix Instances of Class describe classes with the attributes from _Object, plus the following: super -- list of super classes (Class instances if possible); methods -- mapping of method names to beginning line numbers. If the name of a super class is not recognized, the corresponding entry in the list of super classes is not a class instance but a string giving the name of the super class. Since import statements are recognized and imported modules are scanned as well, this shouldn't happen often. �����N)� readmodule� readmodule_ex�Class�Functionc�������������������������\�rS�rSrSrS�rSrg)�_Object�5���z+Information about Python class or function.c������������������~�����Xl���������X l��������X0l��������X@l��������XPl��������X`l��������0�U�l��������Ub��XR������������������U'���g�g��N)�module�name�file�lineno� end_lineno�parent�children)�selfr���r ���r���r���r���r���s��� �-/opt/alt/python313/lib64/python3.13/pyclbr.py�__init__�_Object.__init__7���s>��������� �� ���$������ ���$(�O�O�D�!�������)r���r���r���r���r���r ���r���N)�__name__� __module__�__qualname__�__firstlineno__�__doc__r����__static_attributes__��r���r���r���r���5���s ������1� )r���r���c��������������������:���^���\�rS�rSrSr�SSS.U�4S�jjjrSrU�=r$�)r����D���z7Information about a Python function, including methods.N�r���c�����������������|���>��[���������TU�]��XX4Xu5������ �X`l��������[��������U[��������5������(�������a��XER ������������������U'���g�g�r���)�superr����is_async� isinstancer����methods) r���r���r ���r���r���r���r$���r���� __class__s ��� �r���r����Function.__init__F���s7������� ����t�Z�H� � ��f�e�$�$�#)�N�N�4� ��%r����r$���)NF�r���r���r���r���r���r���r���� __classcell__�r'���s���@r���r���r���D���s�������=�',�*�<@�*��*r���r���c��������������������:���^���\�rS�rSrSr�SSS.U�4S�jjjrSrU�=r$�)r����N���z!Information about a Python class.Nr!���c�����������������V���>��[���������TU�]��XXEXv5������ �U=(�������d�� �/�U�l���������0�U�l��������g�r���)r#���r���r&���) r���r���r ����super_r���r���r���r���r'���s ��� �r���r����Class.__init__P���s&������� ����t�Z�H��\�r�� ���r���)r&���r#���r���r*���r,���s���@r���r���r���N���s�������'���,0���r���r���c����������� �������D�����[��������U�R������������������XR������������������UXUS9$�)z*Return a Function after nesting within ob.)r���r$���r���)r���r���r���)�ob� func_namer���r���r$���s��� r����_nest_functionr5���Y���s$�������B�I�I�y�'�'�6��Z�I��Ir���c����������� �������D�����[��������U�R������������������XU�R������������������UXS9$�)z'Return a Class after nesting within ob.�r���r���)r���r���r���)r3���� class_namer���r���r#���s��� r����_nest_classr9���^���s"����������J�r�w�w���3��3r���c�����������������������0�n[��������X=(�������d�� �/�5������R������������������5��������H ��u��p4[��������U[��������5������(�������d��M��XBU'���M"��� �U$�)zxReturn Class objects for the top-level classes in module. This is the original interface, before Functions were added. )�_readmodule�itemsr%���r���)r����path�res�key�values��� r���r���r���d���sB������� �C�!�&�*�"�5�;�;�=� ���e�U�#�#���H��>���Jr���c������������������*�����[��������X=(�������d�� �/�5������$�)z�Return a dictionary with all functions and classes in module. Search for module in PATH + sys.path. If possible, include imported superclasses. Do this by reading source, without importing (and executing) it. )r;���)r���r=���s��� r���r���r���p���s��������v�z�r�*�*r���c����������������������Ub ��U<�SU�<�3nOU�nU[���������;���a ��[���������U���$�0�nU�[��������R������������������;���a��Uc��U[���������U�'���U$�U�R������������������S5������nUS:���aS��U�SU�nXS-���S�n[ ��������XaU5������nUb ��U<�SU<�3nSU;��a��[��������SR ������������������U5������5������e[ ��������XxS���U5������$�Sn Ub��Un OU[��������R������������������-���n [��������R������������������R������������������X:5������nUc��[��������SU<�3US9eU[���������U'���UR������������������b��UR������������������US'����UR������������������R������������������U5������nUc��U$��UR������������������R!������������������U5������n [#��������X1X�XB5������$�!�[��������[ ��������4�a�� �Us�$�f�=�f) a��Do the hard work for readmodule[_ex]. If inpackage is given, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and path is combined with sys.path. N�.r��������__path__zNo package named {}zno module named )r ���)�_modules�sys�builtin_module_names�rfindr;����ImportError�formatr=���� importlib�util�_find_spec_from_path�ModuleNotFoundError�submodule_search_locations�loader� get_source�AttributeError�get_filename�_create_tree)r���r=���� inpackage� fullmodule�tree�i�package� submoduler����f�search_path�spec�source�fnames��� r���r;���r;���z���s��������� )�6�2� �� ���X��� �#�#���D����)�)�)�i�.?�������� ���S��A��A�v���!�*���Q�3�4�L� ��W�I�6��� �!*�G�4�G��V�#��3�:�:�7�C�D�D��9�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�� �%��I�I��� �K�(������s����"E+��+F��?F�c��������������������@�����\�rS�rSrS�rS�rSS.S�jrS�rS�rS �r S r g)�_ModuleBrowser����c������������������N�����X l���������X@l��������X0l��������Xl��������XPl��������/�U�l��������g�r���)r=���rX���r���r���rV����stack)r���r���r=���r���rX���rV���s��� r���r����_ModuleBrowser.__init__����s"������� �� �� ���"���� r���c����������� �����������/�nUR��������������������H���n[��������R������������������"�U5������nX@R������������������;���a ��UR ������������������U�R������������������U���5������ �MH��[��������UR ������������������S5������=n5������S:���a:��UGt�pgnU[��������;���a)��UR ������������������[��������U���R������������������X�5������5������ �M���M���UR ������������������U5������ �M���� �U�R������������������(�������a��U�R������������������S���OS�n [��������U�R������������������UR������������������X R������������������UR������������������X�R������������������S9nU c��X�R������������������UR������������������'���U�R������������������R ������������������U5������ �U�R!������������������U5������ �U�R������������������R#������������������5������� �g�)NrC���rD������r7���)�bases�ast�unparserX����append�len�splitrF����getre���r���r���r ���r���r���r���� generic_visit�pop) r����noderi����baser ����names�_r����class_r���s ��� r����visit_ClassDef�_ModuleBrowser.visit_ClassDef����s"��������J�J�D��;�;�t�$�D��y�y� ����T�Y�Y�t�_�-��d�j�j��o�-�U�.��2��&+�"��F��X�%��L�L��&�!1�!5�!5�f�!C�D��&�����T�"����$(�:�:����B��4���t�{�{�D�I�I�u�i�i����$���B���>�#)�I�I�d�i�i� �� � ���&�!����4� �� � ���r���Fr)���c���������� �����������U�R�������������������(�������a��U�R�������������������S���OS�n[��������U�R������������������UR������������������U�R������������������UR ������������������X2UR������������������S9nUc��X@R������������������UR������������������'���U�R�������������������R������������������U5������ �U�R������������������U5������ �U�R�������������������R������������������5������� �g�)Nrh���r!���)re���r���r���r ���r���r���r���rX���rl���rp���rq���)r���rr���r$���r����functions��� r����visit_FunctionDef� _ModuleBrowser.visit_FunctionDef����s�������#'�:�:����B��4���D�K�K����D�I�I�t�{�{�"����J���>�#+�I�I�d�i�i� �� � ���(�#����4� �� � ���r���c������������������$�����U�R������������������USS9 �g�)NTr)���)r{���)r���rr���s��� r����visit_AsyncFunctionDef�%_ModuleBrowser.visit_AsyncFunctionDef����s���������t�d��3r���c������������������"����UR�������������������S:w��a��g�UR�������������������H0��n��[��������UR������������������U�R������������������U�R ������������������5������ �M2��� �g�!�[���������a�� �[��������UR������������������/�5������ ��MX��f�=�f!�[��������[��������4�a�� ��Mo��f�=�f)Nr���)� col_offsetrt���r;���r ���r=���rV���rJ����SyntaxError)r���rr���r���s��� r����visit_Import�_ModuleBrowser.visit_Import����sx�������?�?�a����j�j�F� �1�����T�Y�Y����G��!���#��1�����R�0�1����-�� ��� �s)����+A� A7�3A:�6A7�7A:�:B� Bc������������������L����UR�������������������S:w��a��g��SUR������������������-��nUR������������������(�������a��X!R������������������- ��n[��������X R������������������U�R ������������������5������nUR�������������������H���nUR������������������U;���a:��X#R���������������������U�R������������������UR������������������=(�������d�� �UR������������������'���MM��UR������������������S:X��d��M_��UR������������������5��������H+��u��pEUR������������������S5������(�������a��M��XPR������������������U'���M-��� �M���� �g�!�[��������[��������4�a�� ��g�f�=�f)Nr���rC����*ru���)r�����levelr���r;���r=���rV���rJ���r����rt���r ���rX����asnamer<���� startswith)r���rr���r���r ����import_name�import_values��� r����visit_ImportFrom�_ModuleBrowser.visit_ImportFrom����s��������?�?�a��� ��4�:�:�%�F��{�{��+�+�%�� ����D�N�N�C�F���J�J�D��y�y�F�"�6<�Y�Y�6G�� � �$�+�+�2����3����c�!�17����-�K�"�-�-�c�2�2� �-9�I�I�k�*��2@� �����[�)�� �� �s����AD��D#�"D#)r���rV���r���r=���re���rX���N)r���r���r���r���r���rw���r{���r~���r����r����r���r���r���r���rb���rb�������s%��������2�38���4� �:r���rb���c������������������~�����[��������XX$U5������nUR������������������[��������R������������������"�U5������5������ �UR������������������$�r���)rb����visitrj����parserX���)rW���r=���r`���r_���rX���rV����mbrowsers��� r���rU���rU��� ��s/�������j��Y�G�H��N�N�3�9�9�V�$�%��=�=�r���c�������������������x����SSK�n��[��������R������������������S���nU�R������������������R������������������U5������(�������aa��U�R������������������R ������������������U5������/nU�R������������������R������������������U5������nUR������������������5�������R������������������S5������(�������a��USS�nO/�n[��������X5������nS�n[��������UR������������������5�������USS9nS nU(�������Ga`��UR������������������5�������n[��������U[��������5������(�������a��M/��[!��������US 5������(�������d��SUl��������[��������U[$��������5������(�������aQ��[��������UR&������������������R������������������5�������USS9nU�H��n UR"������������������U-���U l��������M��� �UR)������������������U5������ �[��������U[*��������5������(�������aI��[-��������SR/������������������SUR"������������������-��UR0������������������UR2������������������UR4������������������5������5������ �OR[��������U[6��������5������(�������a=��[-��������S R/������������������SUR"������������������-��UR0������������������UR4������������������5������5������ �U(�������a��GM_��gg!� �[��������n�GN =�f)z?Print module output (default this file) for quick visual check.r���NrD���z.py���c�����������������������[��������U�SS5������$�)Nr���r���)�getattr)�as��� r����<lambda>�_main.<locals>.<lambda>"��s ������7�1�h��2r���T)r?����reverse�����indentz{}class {} {} {}� z{}def {} {})�osrG����argv�__file__r=����exists�dirname�basename�lower�endswithr����sorted�valuesrq���r%����list�hasattrr����r���r����extendr����printrK���r ���r#���r���r���) r�����modr=���rX���� lineno_key�objs�indent_level�obj�new_objsr3���s ��� r����_mainr������s������ ���h�h�q�k��� �w�w�~�~�c���������$�%���g�g���s�#���9�9�;����&�&��c�r�(�C������#�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.��.H9�__main__)Fr���)r���rj���rG����importlib.utilrL����__all__rF���r���r���r���r5���r9���r���r���r;����NodeVisitorrb���rU���r����r���r���r���r����<module>r�������s������)�V��� ��� >�� ��)��)�*�w��*��G���I� 3� �+�=J�@P:�S�_�_��P:�f�$P�L��z�� �G��r���