
    `2f                         d dl mZ  G d de      Ze G d de             Ze G d de             Ze G d d	e             Ze G d
 de             Ze G d de             Ze G d de             Z	 G d de      Z
 G d de      Zy)    )with_str_methodc                       e Zd Zy)JMESPathErrorN__name__
__module____qualname__     S/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/jmespath/exceptions.pyr   r          r   r   c                   ,     e Zd ZdZef fd	Zd Z xZS )
ParseErrorzInvalid jmespath expressionc                     t         t        |   |||       || _        || _        |j                         | _        || _        d | _        y N)	superr   __init__lex_positiontoken_valueupper
token_typemsg
expression)selfr   r   r   r   	__class__s        r   r   zParseError.__init__   sD    j$({JO(&$**,r   c                     d| j                   dz   z  dz   }| j                  d| j                   d| j                  d| j                  d| j                  d|S )	N    ^z: Parse error at column z	, token "z" (z), for expression:
""
)r   r   r   r   r   r   	underlines     r   __str__zParseError.__str__   sN    4,,q01C7	 $++T-=-=t,	-r   )r   r   r	   _ERROR_MESSAGEr   r#   __classcell__r   s   @r   r   r      s    2N#-r   r   c                       e Zd Zd Zd Zy)IncompleteExpressionErrorc                 N    || _         t        |      | _        d | _        d | _        y r   )r   lenr   r   r   )r   r   s     r   set_expressionz(IncompleteExpressionError.set_expression!   s$    $
Or   c                 P    d| j                   dz   z  dz   }d| j                  d|S )Nr   r   r   z5Invalid jmespath expression: Incomplete expression:
"r    )r   r   r!   s     r   r#   z!IncompleteExpressionError.__str__'   s1    4,,q01C7	 //96	7r   N)r   r   r	   r+   r#   r
   r   r   r(   r(      s     7r   r(   c                   &     e Zd Zd fd	Zd Z xZS )
LexerErrorc                 h    || _         || _        || _        t        t        |   |||       || _        y r   )lexer_positionlexer_valuemessager   r.   r   r   )r   r0   r1   r2   r   r   s        r   r   zLexerError.__init__1   s:    ,&j$()4)0	2 %r   c                 d    d| j                   z  dz   }d| j                  d| j                  d|S )Nr   r   zBad jmespath expression: z:

)r0   r2   r   r!   s     r   r#   zLexerError.__str__;   s0    $---3	LL$//96 	6r   r   )r   r   r	   r   r#   r%   r&   s   @r   r.   r.   /   s    %6r   r.   c                       e Zd Zd Zd Zd Zy)
ArityErrorc                 <    || _         || _        || _        d | _        y r   )expected_arityactual_arityfunction_namer   )r   expectedactualnames       r   r   zArityError.__init__C   s!    &"!r   c                     d| j                   d| j                  d| j                         d| j                  d| j                  S )Nz	Expected r   argument for function (), received r8   
_pluralizer:   r9   r   s    r   r#   zArityError.__str__I   =     ''OOJ0C0CD&&%%' 	(r   c                     |dk(  r|S |dz   S )Nr   sr
   )r   wordcounts      r   rC   zArityError._pluralizeQ   s    A:K#:r   N)r   r   r	   r   r#   rC   r
   r   r   r6   r6   A   s    (r   r6   c                       e Zd Zd Zy)VariadictArityErrorc                     d| j                   d| j                  d| j                         d| j                  d| j                  S )NzExpected at least r   r?   r@   rA   rB   rD   s    r   r#   zVariadictArityError.__str__Z   rE   r   N)r   r   r	   r#   r
   r   r   rK   rK   X   s    (r   rK   c                       e Zd Zd Zd Zy)JMESPathTypeErrorc                 <    || _         || _        || _        || _        y r   )r:   current_valueactual_typeexpected_types)r   r:   rP   rQ   rR   s        r   r   zJMESPathTypeError.__init__e   s"    **&,r   c           	      p    d| j                   d| j                  d| j                  d| j                  d	S )NzIn function z(), invalid type for value: z, expected one of: z, received: "")r:   rP   rR   rQ   rD   s    r   r#   zJMESPathTypeError.__str__l   s0     &&(:(:'')9)9; 	<r   N)r   r   r	   r   r#   r
   r   r   rN   rN   c   s    -<r   rN   c                        e Zd Z fdZ xZS )EmptyExpressionErrorc                 ,    t         t        |   d       y )Nz-Invalid JMESPath expression: cannot be empty.)r   rV   r   )r   r   s    r   r   zEmptyExpressionError.__init__t   s    "D2;	=r   )r   r   r	   r   r%   r&   s   @r   rV   rV   s   s    = =r   rV   c                       e Zd Zy)UnknownFunctionErrorNr   r
   r   r   rY   rY   y   r   r   rY   N)jmespath.compatr   
ValueErrorr   r   r(   r.   r6   rK   rN   rV   rY   r
   r   r   <module>r\      s    +	J 	 - - -, 7
 7 7 6 6 6"   , (* ( ( < < <== =	= 	r   