HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/jmespath/__pycache__/exceptions.cpython-38.pyc
U

�)Y �@s�ddlmZGdd�de�ZeGdd�de��ZeGdd�de��ZeGdd	�d	e��ZeGd
d�de��ZeGdd
�d
e��ZeGdd�de��Z	Gdd�de�Z
Gdd�de�ZdS)�)�with_str_methodc@seZdZdS)�
JMESPathErrorN��__name__�
__module__�__qualname__�rr�5/usr/lib/python3/dist-packages/jmespath/exceptions.pyrsrcs,eZdZdZef�fdd�	Zdd�Z�ZS)�
ParseErrorzInvalid jmespath expressioncs:tt|��|||�||_||_|��|_||_d|_dS�N)	�superr
�__init__�lex_position�token_value�upper�
token_type�msg�
expression)�selfrrrr��	__class__rr	r
s
zParseError.__init__cCs0d|jdd}d|j|j|j|j|j|fS)N� ��^zF%s: Parse error at column %s, token "%s" (%s), for expression:
"%s"
%s)rrrrr�rZ	underlinerrr	�__str__s���zParseError.__str__)rrrZ_ERROR_MESSAGEr
r�
__classcell__rrrr	r
s�
r
c@seZdZdd�Zdd�ZdS)�IncompleteExpressionErrorcCs ||_t|�|_d|_d|_dSr)r�lenrrr)rrrrr	�set_expression!s
z(IncompleteExpressionError.set_expressioncCs d|jdd}d|j|fS)Nrrrz;Invalid jmespath expression: Incomplete expression:
"%s"
%s)rrrrrr	r's
��z!IncompleteExpressionError.__str__N)rrrrrrrrr	rsrcs&eZdZd�fdd�	Zdd�Z�ZS)�
LexerErrorNcs0||_||_||_tt|��|||�||_dSr)�lexer_position�lexer_value�messagerr r
r)rr!r"r#rrrr	r
1s�zLexerError.__init__cCs d|jd}d|j|j|fS)Nrrz"Bad jmespath expression: %s:
%s
%s)r!r#rrrrr	r;s�zLexerError.__str__)N)rrrr
rrrrrr	r /s
r c@s$eZdZdd�Zdd�Zdd�ZdS)�
ArityErrorcCs||_||_||_d|_dSr)�expected_arity�actual_arity�
function_namer)rZexpectedZactual�namerrr	r
CszArityError.__init__cCs d|j|�d|j�|j|jfS)Nz-Expected %s %s for function %s(), received %s�argument�r%�
_pluralizer'r&�rrrr	rIs��zArityError.__str__cCs|dkr|S|dSdS)Nr�sr)rZword�countrrr	r+QszArityError._pluralizeN)rrrr
rr+rrrr	r$Asr$c@seZdZdd�ZdS)�VariadictArityErrorcCs d|j|�d|j�|j|jfS)Nz6Expected at least %s %s for function %s(), received %sr)r*r,rrr	rZs��zVariadictArityError.__str__N)rrrrrrrr	r/Xsr/c@seZdZdd�Zdd�ZdS)�JMESPathTypeErrorcCs||_||_||_||_dSr)r'�
current_value�actual_type�expected_types)rr'r1r2r3rrr	r
eszJMESPathTypeError.__init__cCsd|j|j|j|jfS)NzQIn function %s(), invalid type for value: %s, expected one of: %s, received: "%s")r'r1r3r2r,rrr	rls��zJMESPathTypeError.__str__N)rrrr
rrrrr	r0csr0cseZdZ�fdd�Z�ZS)�EmptyExpressionErrorcstt|��d�dS)Nz-Invalid JMESPath expression: cannot be empty.)rr4r
r,rrr	r
ts
�zEmptyExpressionError.__init__)rrrr
rrrrr	r4ssr4c@seZdZdS)�UnknownFunctionErrorNrrrrr	r5ysr5N)Zjmespath.compatr�
ValueErrorrr
rr r$r/r0r4r5rrrr	�<module>s