
    i
                     t    S r SSKJr  SSKr " S S\5      r " S S\5      r " S S	\5      r " S
 S\	5      r
g)zSpy-related errors.    )unicode_literalsNc                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InternalKGBError   z2An internal error about the inner workings of KGB.c                 2   > [         [        U ]  SU-  5        g)zInitialize the error.

Args:
    msg (unicode):
        The message to display. A general message about contacting
        support will be appended to this.
z7%s

This is an internal error in KGB. Please report it!N)superr   __init__)selfmsg	__class__s     I/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/kgb/errors.pyr	   InternalKGBError.__init__   s#     	.B	     __name__
__module____qualname____firstlineno____doc__r	   __static_attributes____classcell__r   s   @r   r   r      s    < r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ExistingSpyError   zAn error for when an existing spy was found on a function.

This will provide a helpful error message explaining what went wrong,
showing a backtrace of the original spy's setup in order to help diagnose
the problem.
c           	         > [         [        U ]  SUSR                  [        R
                  " UR                  R                  R                  5      SS 5      S.-  5        g)zcInitialize the error.

Args:
    func (callable):
        The function containing an existing spy.
zThe function %(func)r has already been spied on. Here is where that spy was set up:

%(stacktrace)s
You may have encountered a crash in that test preventing the spy from being unregistered. Try running that test manually. N)func
stacktrace)	r   r   r	   join	tracebackformat_stackspy
init_framef_back)r
   r    r   s     r   r	   ExistingSpyError.__init__!   s`     	.K  ggi&<&<HH''..'002'5 6	
	r   r   r   r   s   @r   r   r      s     r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )IncompatibleFunctionError5   zAn error for when a function signature is incompatible.

This is used for the ``call_fake`` function passed in when setting up a
spy.
c                    > [         [        U ]  SU< SUR                  5       < SU< SUR                  5       < S3	5        g)aq  Initialize the error.

Args:
    func (callable):
        The function containing the original signature.

    func_sig (kgb.signature.FunctionSig):
        The signature of ``func``.

    incompatible_func (callable):
        The function that was not compatible.

    incompatible_func_sig (kgb.signature.FunctionSig):
        The signature of ``incompatible_func``.
zThe function signature of z (z) is not compatible with z).N)r   r*   r	   format_arg_spec)r
   r    func_sigincompatible_funcincompatible_func_sigr   s        r   r	   "IncompatibleFunctionError.__init__<   s8    " 	'7 $446'')	+	,r   r   r   r   s   @r   r*   r*   5   s    , ,r   r*   c                       \ rS rSrSrSrg)UnexpectedCallErrorU   z/A call was made to a spy that was not expected.r   N)r   r   r   r   r   r   r   r   r   r3   r3   U   s    9r   r3   )r   
__future__r   r#   	Exceptionr   
ValueErrorr   r*   AssertionErrorr3   r   r   r   <module>r9      s?     ' y "z 8,
 ,@:. :r   