Edit File: exceptions.cpython-311.pyc
� ����r�d!3��������������������������d�Z�ddlmZ�ddlmZ�ddlmZmZ�ddlm Z �erddlm Z mZmZm Z �ddlmZ�dZ�G�d ��d e������������Z�G�d��de������������Z�G�d ��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��de������������Z�G�d��d e������������Z�G�d!��d"e������������Z�G�d#��d$e������������Z�G�d%��d&e������������Z �G�d'��d(e������������Z!�G�d)��d*e������������Z"�G�d+��d,e������������Z#�G�d-��d.e������������Z$�G�d/��d0e������������Z%�G�d1��d2e������������Z&�G�d3��d4e&������������Z'e j(��������Z)e j*��������Z+e j,��������Z-eZ.eZ/eZ0eZ1d5S�)6z<This module contains exceptions used in the astroid library.�����)�annotations)�Sequence)� TYPE_CHECKING�Any)�util)� arguments�bases�nodes�objects)�InferenceContext)�AstroidBuildingError�AstroidBuildingException�AstroidError�AstroidImportError�AstroidIndexError�AstroidSyntaxError�AstroidTypeError�AstroidValueError�AttributeInferenceError�BinaryOperationError�DuplicateBasesError�InconsistentMroError�InferenceError�InferenceOverwriteError�MroError�NameInferenceError� NoDefault� NotFoundError�OperationError�ParentMissingError�ResolveError�StatementMissing�SuperArgumentTypeError� SuperError�TooManyLevelsError�UnaryOperationError�UnresolvableName�UseInferenceDefaultc�������������������.�������e�Zd�ZdZdd��fd � Zd d �Z��xZS�)r���an��Base exception class for all astroid related exceptions. AstroidError and its subclasses are structured, intended to hold objects representing state when the exception is thrown. Field values are passed to the constructor as keyword-only arguments. Each subclass has its own set of standard fields, but use your best judgment to decide whether a specific exception instance needs more or fewer fields for debugging. Field values may be used to lazily generate the error message: self.message.format() will be called with the field names and values supplied as keyword arguments. ���message�str�kwsr����return�Nonec�����������������������t���������������������������������������������|�������������||�_��������|�����������������������������������D�]\��}}t ����������|�||��������������d�S��N)�super�__init__r+����items�setattr)�selfr+���r-����key�value� __class__s��� ��c/builddir/build/BUILD/cloudlinux-venv-1.0.2/venv/lib/python3.11/site-packages/astroid/exceptions.pyr3���zAstroidError.__init__@���s\������� ������!�!�!�����)�)�+�+�� &�� &�J�C���D�#�u�%�%�%�%� &�� &�����c�����������������@������|�j���������j��������di�t����������|���������������S��N��)r+����format�vars�r6���s��� r:����__str__zAstroidError.__str__F���s#������"�t�|�"�0�0�T�$�Z�Z�0�0�0r;���)r*���)r+���r,���r-���r���r.���r/����r.���r,�����__name__� __module__�__qualname__�__doc__r3���rB���� __classcell__�r9���s���@r:���r���r���2���s`������������������&��&��&��&��&��&��&�1��1��1��1��1��1��1��1r;���r���c�������������������4�������e�Zd�ZdZ � � � � � � �dd��fd� Z��xZS�)r ���z�Exception class when we are unable to build an astroid representation. Standard attributes: modname: Name of the module that AST construction failed for. error: Exception raised during construction. �"Failed to import module {modname}.Nr+���r,����modname� str | None�error�Exception | None�source�path�cls�type | None� class_reprr-���r���r.���r/���c�����������������������||�_���������||�_��������||�_��������||�_��������||�_��������||�_���������t ������������������������j��������|fi�|���d�S�r1���)rM���rO���rQ���rR���rS���rU���r2���r3���) r6���r+���rM���rO���rQ���rR���rS���rU���r-���r9���s ��� �r:���r3���zAstroidBuildingError.__init__R���sT������������� ������ ����$���������(�(�C�(�(�(�(�(r;���)rL���NNNNNN)r+���r,���rM���rN���rO���rP���rQ���rN���rR���rN���rS���rT���rU���rN���r-���r���r.���r/����rE���rF���rG���rH���r3���rI���rJ���s���@r:���r ���r ���J���sc�������������������<�"�"&�!���!%�)��)��)��)��)��)��)��)��)��)��)r;���r ���c������������������������e�Zd�ZdZdS�)r���z@Exception class used when a module can't be imported by astroid.N�rE���rF���rG���rH���r>���r;���r:���r���r���f���s��������������J�J�J�Jr;���r���c�������������������,�������e�Zd�ZdZ � � �dd��fd� Z��xZS�)r%���z�Exception class which is raised when a relative import was beyond the top-level. Standard attributes: level: The level which was attempted. name: the name of the module on which the relative import was attempted. �BRelative import with too many levels ({level}) for module {name!r}Nr+���r,����level� int | None�namerN���r-���r���r.���r/���c�����������������X������||�_���������||�_���������t������������������������j��������|fi�|���d�S�r1���)r\���r^���r2���r3���)r6���r+���r\���r^���r-���r9���s��� �r:���r3���zTooManyLevelsError.__init__r���s8���������� ��� �������(�(�C�(�(�(�(�(r;���)r[���NN) r+���r,���r\���r]���r^���rN���r-���r���r.���r/���rW���rJ���s���@r:���r%���r%���j���sW������������������(� �� )�� )�� )�� )�� )�� )�� )�� )�� )�� )�� )r;���r%���c�������������������(�������e�Zd�ZdZ �dd��fd � Z��xZS�)r���z3Exception class used when a module can't be parsed.Nr+���r,���rM���rN���rO���� ExceptionrR���rQ���r.���r/���c�����������������R������t���������������������������������������������|||||�������������d�S�r1���)r2���r3���)r6���r+���rM���rO���rR���rQ���r9���s��� �r:���r3���zAstroidSyntaxError.__init__����s+�������� ������'�5�&�$�?�?�?�?�?r;���r1���)r+���r,���rM���rN���rO���ra���rR���rN���rQ���rN���r.���r/���rW���rJ���s���@r:���r���r������sX���������������=�=��"� @��@��@��@��@��@��@��@��@��@��@r;���r���c�������������������,�������e�Zd�ZdZ � � �dd��fd� Z��xZS�)r���z�Raised by function's `default_value` method when an argument has no default value. Standard attributes: func: Function node. name: Name of argument without a default. �%{func!r} has no default for {name!r}.Nr+���r,����func�nodes.FunctionDef | Noner^���rN���r-���r���r.���r/���c�����������������X������||�_���������||�_���������t������������������������j��������|fi�|���d�S�r1���)re���r^���r2���r3���)r6���r+���re���r^���r-���r9���s��� �r:���r3���zNoDefault.__init__����s8���������� ��� �������(�(�C�(�(�(�(�(r;���)rd���NN) r+���r,���re���rf���r^���rN���r-���r���r.���r/���rW���rJ���s���@r:���r���r�������sW�������������������?�)-�� )�� )�� )�� )�� )�� )�� )�� )�� )�� )�� )r;���r���c�������������������(�������e�Zd�ZdZ �d d��fd� Z��xZS�)r!���z�Base class of astroid resolution/inference error. ResolveError is not intended to be raised. Standard attributes: context: InferenceContext object. r*���Nr+���r,����context�InferenceContext | Noner-���r���r.���r/���c�����������������J������||�_����������t������������������������j��������|fi�|���d�S�r1���)ri���r2���r3���)r6���r+���ri���r-���r9���s��� �r:���r3���zResolveError.__init__����s1�����������������(�(�C�(�(�(�(�(r;���)r*���N)r+���r,���ri���rj���r-���r���r.���r/���rW���rJ���s���@r:���r!���r!�������sS�������������������EI�)��)��)��)��)��)��)��)��)��)��)r;���r!���c�������������������0�������e�Zd�ZdZ �dd��fd� Zdd�Z��xZS�)r���a ��Error raised when there is a problem with method resolution of a class. Standard attributes: mros: A sequence of sequences containing ClassDef nodes. cls: ClassDef node whose MRO resolution failed. context: InferenceContext object. Nr+���r,����mros�list[nodes.ClassDef]rS����nodes.ClassDefri���rj���r-���r���r.���r/���c�����������������f������||�_���������||�_��������||�_���������t������������������������j��������|fi�|���d�S�r1���)rm���rS���ri���r2���r3���)r6���r+���rm���rS���ri���r-���r9���s��� �r:���r3���zMroError.__init__����s?���������� �������������(�(�C�(�(�(�(�(r;���c����������������������d����������������������d��|�j��������D���������������������������}|�j�����������������������������||�j���������������������S�)N�, c��������������3���\���K����|�]'}d�d����������������������d��|D�����������������������������d�V����(dS�)�(rr���c��������������3���$���K����|�]}|j���������V����d�S�r1���)r^���)�.0�bs��� r:���� <genexpr>z-MroError.__str__.<locals>.<genexpr>.<genexpr>����s$����������+>�+>�q�A�F�+>�+>�+>�+>�+>�+>r;����)N)�join)rv����ms��� r:���rx���z#MroError.__str__.<locals>.<genexpr>����sI����������U�U�a�A�$�)�)�+>�+>�A�+>�+>�+>�">�">�A�A�A�U�U�U�U�U�Ur;���)rm���rS���)rz���rm���r+���r?���rS���)r6���� mro_namess��� r:���rB���zMroError.__str__����sA�������I�I�U�U�4�9�U�U�U�U�U� ��|�"�"� �t�x�"�@�@�@r;���r1���)r+���r,���rm���rn���rS���ro���ri���rj���r-���r���r.���r/���rC���rD���rJ���s���@r:���r���r�������sm�������������������,0�)��)��)��)��)��)��)�A��A��A��A��A��A��A��Ar;���r���c������������������������e�Zd�ZdZdS�)r���zDError raised when there are duplicate bases in the same class bases.NrY���r>���r;���r:���r���r�������s��������������N�N�N�Nr;���r���c������������������������e�Zd�ZdZdS�)r���z0Error raised when a class's MRO is inconsistent.NrY���r>���r;���r:���r���r�������s��������������:�:�:�:r;���r���c�������������������,�������e�Zd�ZdZd��fd �Zd d�Z��xZS�)r$���z�Error raised when there is a problem with a *super* call. Standard attributes: *super_*: The Super instance that raised the exception. context: InferenceContext object. r+���r,����super_� objects.Superr-���r���r.���r/���c�����������������J������||�_����������t������������������������j��������|fi�|���d�S�r1���)r����r2���r3���)r6���r+���r����r-���r9���s��� �r:���r3���zSuperError.__init__����s/����������������(�(�C�(�(�(�(�(r;���c�����������������J������|�j���������j��������di�t����������|�j����������������������S�r=���)r+���r?���r@���r����rA���s��� r:���rB���zSuperError.__str__����s'������"�t�|�"�7�7�T�$�+�%6�%6�7�7�7r;���)r+���r,���r����r����r-���r���r.���r/���rC���rD���rJ���s���@r:���r$���r$�������s[������������������)��)��)��)��)��)�8��8��8��8��8��8��8��8r;���r$���c�������������������J�������e�Zd�ZdZ � � � � � � � � � � � � � � � � � �d(d)��fd'� Z��xZS�)*r���z�Raised when we are unable to infer a node. Standard attributes: node: The node inference was called on. context: InferenceContext object. �Inference failed for {node!r}.Nr+���r,����node�$nodes.NodeNG | bases.Instance | Noneri���rj����target�targets�nodes.Tuple | None� attributerN����unknown�assign_path�list[int] | None�caller�nodes.Call | None�stmts�.Sequence[nodes.NodeNG | bases.Instance] | None�frame�nodes.LocalsDictNodeNG | None� call_site�arguments.CallSite | Nonere���rf����arg�positional_arguments�list | None� unpacked_args�keyword_arguments�dict | None�unpacked_kwargsr-���r���r.���r/���c�����������������*�����||�_���������||�_��������||�_��������||�_��������||�_��������||�_��������||�_��������| |�_��������| |�_��������||�_ ��������||�_ ��������| |�_��������||�_��������||�_ ��������||�_��������||�_��������||�_���������t#������������������������j��������|fi�|���d�S�r1���)r����ri���r����r����r����r����r����r����r����r����r����re���r����r����r����r����r����r2���r3���)r6���r+���r����ri���r����r����r����r����r����r����r����r����r����re���r����r����r����r����r����r-���r9���s��� �r:���r3���zInferenceError.__init__����s��������,��� ����������"������&�������� ��� �"����� ����$8��!�*���!2���.���������(�(�C�(�(�(�(�(r;���)r����NNNNNNNNNNNNNNNNN)(r+���r,���r����r����ri���rj���r����r����r����r����r����rN���r����r����r����r����r����r����r����r����r����r����r����r����re���rf���r����rN���r����r����r����r����r����r����r����r����r-���r���r.���r/���rW���rJ���s���@r:���r���r�������s��������������������8�59�+/�7;�&*� $�8<�(,�$(�@D�/3�/3�)-��,0�%)�)-�'+�'')��')��')��')��')��')��')��')��')��')��')r;���r���c�������������������.�������e�Zd�ZdZ � � � �dd��fd� Z��xZS�)r���a ��Raised when a name lookup fails, corresponds to NameError. Standard attributes: name: The name for which lookup failed, as a string. scope: The node representing the scope in which the lookup occurred. context: InferenceContext object. � {name!r} not found in {scope!r}.Nr+���r,���r^���rN����scoper����ri���rj���r-���r���r.���r/���c�����������������f������||�_���������||�_��������||�_���������t������������������������j��������|fi�|���d�S�r1���)r^���r����ri���r2���r3���)r6���r+���r^���r����ri���r-���r9���s��� �r:���r3���zNameInferenceError.__init__"���?���������� ��� ����������(�(�C�(�(�(�(�(r;���)r����NNN)r+���r,���r^���rN���r����r����ri���rj���r-���r���r.���r/���rW���rJ���s���@r:���r���r�����sZ�������������������:��/3�+/�)��)��)��)��)��)��)��)��)��)��)r;���r���c�������������������4�������e�Zd�ZdZ � � � � � � �dd��fd� Z��xZS�)r���a��Raised when an attribute lookup fails, corresponds to AttributeError. Standard attributes: target: The node for which lookup failed. attribute: The attribute for which lookup failed, as a string. context: InferenceContext object. �&{attribute!r} not found on {target!r}.r*���Nr+���r,���r����r����r����ri���rj���rm����list[nodes.ClassDef] | Noner�����nodes.ClassDef | NonerS���r-���r���r.���r/���c�����������������������||�_���������||�_��������||�_��������||�_��������||�_��������||�_���������t ������������������������j��������|fi�|���d�S�r1���)r����r����ri���rm���r����rS���r2���r3���) r6���r+���r����r����ri���rm���r����rS���r-���r9���s ��� �r:���r3���z AttributeInferenceError.__init__9��sT��������#����������� �������������(�(�C�(�(�(�(�(r;���)r����r*���NNNNN)r+���r,���r����r,���r����r����ri���rj���rm���r����r����r����rS���r����r-���r���r.���r/���rW���rJ���s���@r:���r���r���0��sd�������������������@��7;�+/�,0�(,�%)�)��)��)��)��)��)��)��)��)��)��)r;���r���c������������������������e�Zd�ZdZdS�)r(���zyException to be raised in custom inference function to indicate that it should go back to the default behaviour. NrY���r>���r;���r:���r(���r(���M�����������������������r;���r(���c������������������������e�Zd�ZdZdS�)�_NonDeducibleTypeHierarchyz[Raised when is_subtype / is_supertype can't deduce the relation between two types. NrY���r>���r;���r:���r����r����S��r����r;���r����c�������������������.�������e�Zd�ZdZ � � � �dd��fd� Z��xZS�)r���z@Raised when an Indexable / Mapping does not have an index / key.r*���Nr+���r,���r����r�����index�nodes.Subscript | Noneri���rj���r-���r���r.���r/���c�����������������f������||�_���������||�_��������||�_���������t������������������������j��������|fi�|���d�S�r1����r����r����ri���r2���r3����r6���r+���r����r����ri���r-���r9���s��� �r:���r3���zAstroidIndexError.__init__\��r����r;����r*���NNN�r+���r,���r����r����r����r����ri���rj���r-���r���r.���r/���rW���rJ���s���@r:���r���r���Y��sV���������������J�J���59�(,�+/�)��)��)��)��)��)��)��)��)��)��)r;���r���c�������������������.�������e�Zd�ZdZ � � � �dd��fd� Z��xZS�)r���z9Raised when a TypeError would be expected in Python code.r*���Nr+���r,���r����r����r����r����ri���rj���r-���r���r.���r/���c�����������������f������||�_���������||�_��������||�_���������t������������������������j��������|fi�|���d�S�r1���r����r����s��� �r:���r3���zAstroidTypeError.__init__m��r����r;���r����r����rW���rJ���s���@r:���r���r���j��sV���������������C�C���59�(,�+/�)��)��)��)��)��)��)��)��)��)��)r;���r���c������������������������e�Zd�ZdZdS�)r���z:Raised when a ValueError would be expected in Python code.NrY���r>���r;���r:���r���r���{��s��������������D�D�D�Dr;���r���c������������������������e�Zd�ZdZdS�)r���zYRaised when an inference tip is overwritten. Currently only used for debugging. NrY���r>���r;���r:���r���r�����s��������������������r;���r���c�������������������$�������e�Zd�ZdZd��fd�Z��xZS�)r ���z�Raised when a node which is expected to have a parent attribute is missing one. Standard attributes: target: The node for which the parent lookup failed. r�����nodes.NodeNGr.���r/���c�����������������b������||�_���������t���������������������������������������������d|�d���������������d�S�)NzParent not found on �.�r+���)r����r2���r3����r6���r����r9���s��� �r:���r3���zParentMissingError.__init__���s7���������� �����!C��!C�!C�!C��D�D�D�D�Dr;����r����r����r.���r/���rW���rJ���s���@r:���r ���r ������sQ������������������E��E��E��E��E��E��E��E��E��Er;���r ���c�������������������$�������e�Zd�ZdZd��fd�Z��xZS�)r"���a��Raised when a call to node.statement() does not return a node. This is because a node in the chain does not have a parent attribute and therefore does not return a node for statement(). Standard attributes: target: The node for which the parent lookup failed. r����r����r.���r/���c�����������������`������t����������t����������|����������������������������������d|����������������d�S�)NzStatement not found on r����)r2���r ���r3���r����s��� �r:���r3���zStatementMissing.__init__���s@������� � �$�'�'�0�0�8�f�8�8�� 1�� �� �� �� �� r;���r����rW���rJ���s���@r:���r"���r"������sG������������������ �� �� �� �� �� �� �� �� �� r;���r"���N)2rH���� __future__r����collections.abcr����typingr���r����astroidr���r���r ���r ���r����astroid.contextr����__all__ra���r���r ���r���r%���r���r���r!���r���r���r���r$���r���r���r���r(���r����r���r���r���r���r ���r"����BadOperationMessager����BadUnaryOperationMessager&����BadBinaryOperationMessager���r#���r'���r���r���r>���r;���r:����<module>r�������s����� �C��B��"��"��"��"��"��"��$��$��$��$��$��$��%��%��%��%��%��%��%��%���������������1�8�8�8�8�8�8�8�8�8�8�8�8�0�0�0�0�0�0���@1��1��1��1��1�9��1��1��1�0)��)��)��)��)�<��)��)��)�8K��K��K��K��K�-��K��K��K�)��)��)��)��)�+��)��)��)�*@��@��@��@��@�-��@��@��@�)��)��)��)��)���)��)��)�* )�� )�� )�� )�� )�<�� )�� )�� )� A��A��A��A��A�|��A��A��A�6O��O��O��O��O�(��O��O��O�;��;��;��;��;�8��;��;��;� 8�� 8�� 8�� 8�� 8��� 8�� 8�� 8� /)��/)��/)��/)��/)�\��/)��/)��/)�h)��)��)��)��)���)��)��)�.)��)��)��)��)�l��)��)��)�:���������)�����������������������)��)��)��)��)���)��)��)�")��)��)��)��)�|��)��)��)�"E��E��E��E��E���E��E��E����������l������� E�� E�� E�� E�� E��� E�� E�� E� �� �� �� �� �)�� �� �� �"��)���3����5���#���%���'� �/������r;���