Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/astroid/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/astroid/__pycache__/exceptions.cpython-311.pyc

�

�܋f!3���dZddlmZddlmZddlmZmZddlm	Z	erddlm
Z
mZmZm
Z
ddlmZdZGd	�d
e��ZGd�de��ZGd
�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�d e��ZGd!�d"e��ZGd#�d$e��ZGd%�d&e��Z Gd'�d(e��Z!Gd)�d*e��Z"Gd+�d,e��Z#Gd-�d.e��Z$Gd/�d0e��Z%Gd1�d2e��Z&Gd3�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�.��eZdZdZdd�fd	�
Zd
d
�Z�xZS)ranBase 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	|||���dS�N)�super�__init__r+�items�setattr)�selfr+r-�key�value�	__class__s     ��c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/astroid/exceptions.pyr3zAstroidError.__init__@s\���
������!�!�!�����)�)�+�+�	&�	&�J�C���D�#�u�%�%�%�%�	&�	&�c�@�|jjdit|����S�N�)r+�format�vars�r6s r:�__str__zAstroidError.__str__Fs#��"�t�|�"�0�0�T�$�Z�Z�0�0�0r;)r*)r+r,r-rr.r/�r.r,��__name__�
__module__�__qualname__�__doc__r3rB�
__classcell__�r9s@r:rr2s`���������&�&�&�&�&�&�&�1�1�1�1�1�1�1�1r;rc�4��eZdZdZ							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-rr.r/c���||_||_||_||_||_||_t
��j|fi|��dSr1)rMrOrQrRrSrUr2r3)
r6r+rMrOrQrRrSrUr-r9s
         �r:r3zAstroidBuildingError.__init__RsT��������
������	����$���������(�(�C�(�(�(�(�(r;)rLNNNNNN)r+r,rMrNrOrPrQrNrRrNrSrTrUrNr-rr.r/�rErFrGrHr3rIrJs@r:r
r
Jsc���������<�"�"&�!���!%�)�)�)�)�)�)�)�)�)�)�)r;r
c��eZdZdZdS)rz@Exception class used when a module can't be imported by astroid.N�rErFrGrHr>r;r:rrfs������J�J�J�Jr;rc�,��eZdZdZ			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�namerNr-rr.r/c�X��||_||_t��j|fi|��dSr1)r\r^r2r3)r6r+r\r^r-r9s     �r:r3zTooManyLevelsError.__init__rs8�����
���	�������(�(�C�(�(�(�(�(r;)r[NN)
r+r,r\r]r^rNr-rr.r/rWrJs@r:r%r%jsW���������(� ��
)�
)�
)�
)�
)�
)�
)�
)�
)�
)�
)r;r%c�(��eZdZdZ	dd�fd
�
Z�xZS)rz3Exception class used when a module can't be parsed.Nr+r,rMrNrO�	ExceptionrRrQr.r/c�R��t���|||||��dSr1)r2r3)r6r+rMrOrRrQr9s      �r:r3zAstroidSyntaxError.__init__�s+���	������'�5�&�$�?�?�?�?�?r;r1)r+r,rMrNrOrarRrNrQrNr.r/rWrJs@r:rrsX�������=�=�"�
@�@�@�@�@�@�@�@�@�@�@r;rc�,��eZdZdZ			dd�fd�
Z�xZS)rz�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^rNr-rr.r/c�X��||_||_t��j|fi|��dSr1)rer^r2r3)r6r+rer^r-r9s     �r:r3zNoDefault.__init__�s8�����	���	�������(�(�C�(�(�(�(�(r;)rdNN)
r+r,rerfr^rNr-rr.r/rWrJs@r:rr�sW���������?�)-��		)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)r;rc�(��eZdZdZ	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-rr.r/c�J��||_t��j|fi|��dSr1)rir2r3)r6r+rir-r9s    �r:r3zResolveError.__init__�s1������������(�(�C�(�(�(�(�(r;)r*N)r+r,rirjr-rr.r/rWrJs@r:r!r!�sS���������EI�)�)�)�)�)�)�)�)�)�)�)r;r!c�0��eZdZdZ	dd�fd�
Zdd�Z�xZS)ra	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.ClassDefrirjr-rr.r/c�f��||_||_||_t��j|fi|��dSr1)rmrSrir2r3)r6r+rmrSrir-r9s      �r:r3zMroError.__init__�s?�����	�������������(�(�C�(�(�(�(�(r;c��d�d�|jD����}|j�||j���S)N�, c3�\K�|]'}dd�d�|D�����d�V��(dS)�(rrc3�$K�|]}|jV��dSr1)r^)�.0�bs  r:�	<genexpr>z-MroError.__str__.<locals>.<genexpr>.<genexpr>�s$����+>�+>�q�A�F�+>�+>�+>�+>�+>�+>r;�)N)�join)rv�ms  r:rxz#MroError.__str__.<locals>.<genexpr>�sI����U�U�a�A�$�)�)�+>�+>�A�+>�+>�+>�">�">�A�A�A�U�U�U�U�U�Ur;)rmrS)rzrmr+r?rS)r6�	mro_namess  r:rBzMroError.__str__�sA���I�I�U�U�4�9�U�U�U�U�U�	��|�"�"�	�t�x�"�@�@�@r;r1)r+r,rmrnrSrorirjr-rr.r/rCrDrJs@r:rr�sm���������,0�)�)�)�)�)�)�)�A�A�A�A�A�A�A�Ar;rc��eZdZdZdS)rzDError raised when there are duplicate bases in the same class bases.NrYr>r;r:rr�s������N�N�N�Nr;rc��eZdZdZdS)rz0Error raised when a class's MRO is inconsistent.NrYr>r;r:rr�s������:�:�:�:r;rc�,��eZdZdZd�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-rr.r/c�J��||_t��j|fi|��dSr1)r�r2r3)r6r+r�r-r9s    �r:r3zSuperError.__init__�s/������������(�(�C�(�(�(�(�(r;c�J�|jjdit|j����Sr=)r+r?r@r�rAs r:rBzSuperError.__str__�s'��"�t�|�"�7�7�T�$�+�%6�%6�7�7�7r;)r+r,r�r�r-rr.r/rCrDrJs@r:r$r$�s[���������)�)�)�)�)�)�8�8�8�8�8�8�8�8r;r$c�J��eZdZdZ																		d(d)�fd'�
Z�xZS)*rz�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 | Nonerirj�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 | Nonererf�arg�positional_arguments�list | None�
unpacked_args�keyword_arguments�dict | None�unpacked_kwargsr-rr.r/c�*��||_||_||_||_||_||_||_|	|_|
|_||_	||_
|
|_||_||_
||_||_||_t#��j|fi|��dSr1)r�rir�r�r�r�r�r�r�r�r�rer�r�r�r�r�r2r3)r6r+r�rir�r�r�r�r�r�r�r�r�rer�r�r�r�r�r-r9s                    �r:r3zInferenceError.__init__�s����,��	����������"������&��������
���
�"�����	����$8��!�*���!2���.���������(�(�C�(�(�(�(�(r;)r�NNNNNNNNNNNNNNNNN)(r+r,r�r�rirjr�r�r�r�r�rNr�r�r�r�r�r�r�r�r�r�r�r�rerfr�rNr�r�r�r�r�r�r�r�r-rr.r/rWrJs@r:rr�s����������8�59�+/�7;�&*� $�8<�(,�$(�@D�/3�/3�)-��,0�%)�)-�'+�'')�')�')�')�')�')�')�')�')�')�')r;rc�.��eZdZdZ				dd�fd�
Z�xZS)ra
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�rirjr-rr.r/c�f��||_||_||_t��j|fi|��dSr1)r^r�rir2r3)r6r+r^r�rir-r9s      �r:r3zNameInferenceError.__init__"�?�����	���
����������(�(�C�(�(�(�(�(r;)r�NNN)r+r,r^rNr�r�rirjr-rr.r/rWrJs@r:rrsZ���������:��/3�+/�)�)�)�)�)�)�)�)�)�)�)r;rc�4��eZdZdZ							dd�fd�
Z�xZS)raRaised 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�rirjrm�list[nodes.ClassDef] | Noner��nodes.ClassDef | NonerSr-rr.r/c���||_||_||_||_||_||_t
��j|fi|��dSr1)r�r�rirmr�rSr2r3)
r6r+r�r�rirmr�rSr-r9s
         �r:r3z AttributeInferenceError.__init__9sT���#�����������	�������������(�(�C�(�(�(�(�(r;)r�r*NNNNN)r+r,r�r,r�r�rirjrmr�r�r�rSr�r-rr.r/rWrJs@r:rr0sd���������@��7;�+/�,0�(,�%)�)�)�)�)�)�)�)�)�)�)�)r;rc��eZdZdZdS)r(zyException to be raised in custom inference function to indicate that it
    should go back to the default behaviour.
    NrYr>r;r:r(r(M����������r;r(c��eZdZdZdS)�_NonDeducibleTypeHierarchyz[Raised when is_subtype / is_supertype can't deduce the relation between two
    types.
    NrYr>r;r:r�r�Sr�r;r�c�.��eZdZdZ				dd�fd�
Z�xZS)rz@Raised when an Indexable / Mapping does not have an index / key.r*Nr+r,r�r��index�nodes.Subscript | Nonerirjr-rr.r/c�f��||_||_||_t��j|fi|��dSr1�r�r�rir2r3�r6r+r�r�rir-r9s      �r:r3zAstroidIndexError.__init__\r�r;�r*NNN�r+r,r�r�r�r�rirjr-rr.r/rWrJs@r:rrYsV�������J�J��59�(,�+/�)�)�)�)�)�)�)�)�)�)�)r;rc�.��eZdZdZ				dd�fd�
Z�xZS)rz9Raised when a TypeError would be expected in Python code.r*Nr+r,r�r�r�r�rirjr-rr.r/c�f��||_||_||_t��j|fi|��dSr1r�r�s      �r:r3zAstroidTypeError.__init__mr�r;r�r�rWrJs@r:rrjsV�������C�C��59�(,�+/�)�)�)�)�)�)�)�)�)�)�)r;rc��eZdZdZdS)rz:Raised when a ValueError would be expected in Python code.NrYr>r;r:rr{s������D�D�D�Dr;rc��eZdZdZdS)rzYRaised when an inference tip is overwritten.

    Currently only used for debugging.
    NrYr>r;r:rrs���������r;rc�$��eZdZdZd�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����dS)NzParent not found on �.�r+)r�r2r3�r6r�r9s  �r:r3zParentMissingError.__init__�s7������
�����!C��!C�!C�!C��D�D�D�D�Dr;�r�r�r.r/rWrJs@r:r r �sQ���������E�E�E�E�E�E�E�E�E�Er;r c�$��eZdZdZd�fd�Z�xZS)r"aRaised 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�`��tt|���d|�����dS)NzStatement not found on r�)r2r r3r�s  �r:r3zStatementMissing.__init__�s@���
� �$�'�'�0�0�8�f�8�8�	1�	
�	
�	
�	
�	
r;r�rWrJs@r:r"r"�sG���������
�
�
�
�
�
�
�
�
�
r;r"N)2rH�
__future__r�collections.abcr�typingrr�astroidrrr	r
r�astroid.contextr�__all__rarr
rr%rrr!rrrr$rrrr(r�rrrrr r"�BadOperationMessager�BadUnaryOperationMessager&�BadBinaryOperationMessagerr#r'rrr>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;

Hacked By AnonymousFox1.0, Coded By AnonymousFox