
    ?g                    ~   S SK Jr  S SKrS SKrS SKrS SKJr  S SKJr  S SKJr  S SK	r	S SK
Jr  S SKrS SKrS SKrS SKJr  S SKJr  S S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r   S SKJ!r!  S SKJ"r"  S SKJ#r#  S SKJ$r$  S SKJ%r%  S SKJ&r&  S SK'r'S SK(r(S SK)J*r*  S SK)J+r+  S SK)J,r,  S S K)J-r-  S S!K.J/r/  S S"K0J1r1  S S#K0J2r2  S S$K3J4r4  S S%K5J6r6  S S&K7J8r8  S S'K7J9r9  \Rt                  S(:  a  S S)K;J<r<  \S*   r=\&\$\>   \#\$\>   S+4   4   r? " S, S-5      r@ " S. S/5      rA " S0 S15      rB " S2 S3\\B   5      rC\%" S4\>S5S69rD\\R                   " S7 S8\\D   5      5       5       rF\R                   " S9 S:5      5       rG\R                  " S;S<9 " S= S>5      5       rH\R                  " S;S<9 " S? S@\H5      5       rI\R                  " S;S<9 " SA SB\I5      5       rJ\R                  " S;S<9 " SC SD\I5      5       rK\R                  " S;S<9 " SE SF\H5      5       rL " SG SH\L5      rM\R                  " S;S<9 " SI SJ\H5      5       rN\R                  " S;S<9 " SK SL\H5      5       rO\R                  " S;S<9 " SM SN\H5      5       rP\R                  " S;S<9 " SO SP\H5      5       rQ\R                  " S;S<9 " SQ SR\H5      5       rRSWSS jrS\" \'R                  R                  ST5      5      rV\VR                  SU:X  a  \VR                  rV\" \(R                  5      R                  rYSXSV jrZg)Y    )annotationsN)
CO_VARARGS)CO_VARKEYWORDS)StringIO)Path)format_exception_only)CodeType)	FrameType)TracebackType)Any)Callable)ClassVar)Final)final)Generic)Iterable)List)Literal)Mapping)overload)Pattern)Sequence)SupportsIndex)Tuple)Type)TypeVar)Union)
findsource
getrawcode)getstatementrange_ast)Source)TerminalWriter)
safeformatsaferepr)get_real_func)check_ispytest)absolutepath)bestrelpath)      )BaseExceptionGroup)longshortlinenonativevalueauto.c                      \ rS rSrSrSrSS jr\SS j5       rS r	Sr
\SS j5       r\SS	 j5       r\SS
 j5       r\SS j5       rSS jrSSS jjrSrg)Code>   z#Wrapper around Python code objects.rawc                    Xl         g Nr8   )selfobjs     4/usr/lib/python3/dist-packages/_pytest/_code/code.py__init__Code.__init__C   s        c                $    U " [        U5      5      $ r;   r   )clsr=   s     r>   from_functionCode.from_functionF   s    :c?##rA   c                4    U R                   UR                   :H  $ r;   r8   )r<   others     r>   __eq__Code.__eq__J   s    xx599$$rA   Nc                4    U R                   R                  S-
  $ N   )r9   co_firstlinenor<   s    r>   firstlinenoCode.firstlinenoP   s    xx&&**rA   c                .    U R                   R                  $ r;   )r9   co_namerN   s    r>   name	Code.nameT   s    xxrA   c                
   U R                   R                  (       d  g [        U R                   R                  5      nUR                  5       (       d  [	        S5      eU$ ! [         a    U R                   R                  s $ f = f)zgReturn a path object pointing to source code, or an ``str`` in
case of ``OSError`` / non-existing file. zpath check failed.)r9   co_filenamer)   existsOSError)r<   ps     r>   path	Code.pathX   sj     xx##		(TXX112A88::233H 	( 88'''	(s   A A  BBc                4    [        U R                  5      u  pU$ )zJReturn a _pytest._code.Source object for the full source file of the code.)r   r9   )r<   full_s      r>   
fullsourceCode.fullsourcei   s     TXX&rA   c                ,    [        U R                  5      $ )zGReturn a _pytest._code.Source object for the code object's source only.)r"   r9   rN   s    r>   sourceCode.sourceo   s     dhhrA   c                    U R                   nUR                  nU(       a*  X2R                  [        -  -  nX2R                  [        -  -  nUR
                  SU $ )zReturn a tuple with the argument names for the code object.

If 'var' is set True also return the names of the variable and
keyword arguments when present.
N)r9   co_argcountco_flagsr   r   co_varnames)r<   varr9   argcounts       r>   getargsCode.getargst   sL     hh??z11H~55Hy))rA   )r=   r	   returnNone)r=   objectrm   r6   rm   intrm   strrm   
Path | str)rm   Source | Nonerm   r"   F)ri   boolrm   ztuple[str, ...])__name__
__module____qualname____firstlineno____doc__	__slots__r?   classmethodrD   rH   __hash__propertyrO   rS   r[   r`   rc   rk   __static_attributes__ rA   r>   r6   r6   >   s    -I $ $% H+ +     ( (   
 
* *rA   r6   c                      \ rS rSrSrSrSS jr\SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
 rSS jrSSS jjrSrg)Frame   zcWrapper around a Python frame holding f_locals and f_globals
in which expressions can be evaluated.r8   c                    Xl         g r;   r8   )r<   frames     r>   r?   Frame.__init__   s    rA   c                4    U R                   R                  S-
  $ rK   )r9   f_linenorN   s    r>   linenoFrame.lineno   s    xx  1$$rA   c                .    U R                   R                  $ r;   )r9   	f_globalsrN   s    r>   r   Frame.f_globals   s    xx!!!rA   c                .    U R                   R                  $ r;   )r9   f_localsrN   s    r>   r   Frame.f_locals   s    xx   rA   c                @    [        U R                  R                  5      $ r;   )r6   r9   f_coderN   s    r>   code
Frame.code   s    DHHOO$$rA   c                    U R                   R                  c  [        S5      $ U R                   R                  R                  U R                  5      $ )zStatement this frame is at.rV   )r   r`   r"   getstatementr   rN   s    r>   	statementFrame.statement   s=     99'":yy##00==rA   c                    U R                   R                  5       nUR                  U5        [        XR                  U5      $ )zvEvaluate 'code' in the frame.

'vars' are optional additional local variables.

Returns the result of the evaluation.
)r   copyupdateevalr   )r<   r   varsr   s       r>   r   
Frame.eval   s3     ==%%'D..(33rA   c                    [        U5      $ )zCReturn a 'safe' (non-recursive, one-line) string repr for 'object'.r%   )r<   ro   s     r>   repr
Frame.repr   s    rA   c                    / nU R                   R                  U5       H#  n UR                  X0R                  U   45        M%     U$ ! [         a     M6  f = f)zReturn a list of tuples (name, value) for all arguments.

If 'var' is set True, also include the variable and keyword arguments
when present.
)r   rk   appendr   KeyError)r<   ri   retvalargs       r>   rk   Frame.getargs   sZ     99$$S)CsMM#$678 *
   s   A
AAN)r   r
   rm   rn   rp   rm   zdict[str, Any])rm   r6   rw   )ro   ro   rm   rs   rx   )ri   ry   )rz   r{   r|   r}   r~   r   r?   r   r   r   r   r   r   r   r   rk   r   r   rA   r>   r   r      s    . I % % " " ! ! % % > >	4  rA   r   c                  "   \ rS rSrSrSr S     SS jjr    SS jr\SS j5       r	\SS j5       r
\SS	 j5       rSS
 jr\SS j5       r\SS j5       r\SS j5       rSS jr S   SS jjr\" \5      rSS jrSS jr\SS j5       rSrg)TracebackEntry   zA single entry in a Traceback.	_rawentry_repr_styleNc                    Xl         X l        g r;   r   )r<   rawentry
repr_styles      r>   r?   TracebackEntry.__init__   s    
 !)",rA   c                .    [        U R                  U5      $ r;   )r   r   )r<   r   s     r>   with_repr_styleTracebackEntry.with_repr_style   s     dnnj99rA   c                4    U R                   R                  S-
  $ rK   )r   	tb_linenorN   s    r>   r   TracebackEntry.lineno   s    ~~''!++rA   c                @    [        U R                  R                  5      $ r;   )r   r   tb_framerN   s    r>   r   TracebackEntry.frame   s    T^^,,--rA   c                \    U R                   U R                  R                  R                  -
  $ r;   )r   r   r   rO   rN   s    r>   rellineTracebackEntry.relline   s    {{TZZ__8888rA   c                f    SU R                   R                  R                  U R                  S-   4-  $ )Nz<TracebackEntry %s:%d>rL   )r   r   r[   r   rN   s    r>   __repr__TracebackEntry.__repr__   s(    '4::??+?+?q*QQQrA   c                    U R                   R                  R                  nUc   eUR                  U R                  5      $ )z6_pytest._code.Source object for the current statement.)r   r   r`   r   r   )r<   rc   s     r>   r   TracebackEntry.statement   s8     ++!!!""4;;//rA   c                B    U R                   R                  R                  $ )zPath to the source code.)r   r   r[   rN   s    r>   r[   TracebackEntry.path   s     zz###rA   c                .    U R                   R                  $ )zLocals of underlying frame.)r   r   rN   s    r>   localsTracebackEntry.locals   s     zz"""rA   c                B    U R                   R                  R                  $ r;   )r   r   rO   rN   s    r>   getfirstlinesource!TracebackEntry.getfirstlinesource   s    zz***rA   c                j   U R                   R                  R                  nUc  gS=p4Ub5  U R                   R                  R                  nUb  UR	                  US5      nU R                  5       n [        U R                  X$S9u  pFnUb  Ub  XAU'   X%U $ ! [         a    U R                  S-   n Nf = f)zReturn failing source code.N)astnoderL   )	r   r   r`   r[   getr   r!   r   SyntaxError)r<   astcacherc   keyr   startr_   ends           r>   	getsourceTracebackEntry.getsource   s     ++>**//&&C",,sD1'')	(3VOG 8#7 'C    	"++/C	"s   1B B21B2c                    SnU R                   R                  U R                   R                  4 H	  n US   n  O   U(       a  [	        U5      (       a  U" U5      $ U$ ! [         a     M;  f = f)zReturn True if the current frame has a var __tracebackhide__
resolving to True.

If __tracebackhide__ is a callable, it gets called with the
ExceptionInfo instance and can decide whether to hide the traceback.

Mostly for internal use.
F__tracebackhide__)r   r   r   	Exceptioncallable)r<   excinfotbhmaybe_ns_dcts       r>   ishiddenTracebackEntry.ishidden  st     MR!ZZ00$**2F2FGL
"#67  H 8C==w<
  s   A
A+*A+c                   U R                   R                  R                  n [        U R                  5      R                  5       nS[        U R                  5      U R                  S-   UU4-  $ ! [         a    e [         a    Sn NAf = f)N???z  File %r:%d in %s
  %s
rL   )
r   r   rS   rs   r   lstripKeyboardInterruptBaseExceptionr[   r   )r<   rS   r0   s      r>   __str__TracebackEntry.__str__+  s    zz##	t~~&--/D ,		NKK!O	/
 
 	
 ! 	 	D	s   #A. .BBc                V    U R                   R                  R                  R                  $ )zco_name of underlying code.)r   r   r9   rR   rN   s    r>   rS   TracebackEntry.name=  s     zz""***rA   r;   )r   r   r   Literal['short', 'long'] | Nonerm   rn   )r   r   rm   r   rp   )rm   r   rr   rw   rt   r   )r   z dict[str | Path, ast.AST] | Nonerm   rv   )r   #ExceptionInfo[BaseException] | Nonerm   ry   )rz   r{   r|   r}   r~   r   r?   r   r   r   r   r   r   r   r[   r   r   r   rc   r   r   rS   r   r   rA   r>   r   r      s   (,I
 7;-- 4- 
	-:9:	:
 , , . . 9 9R 0 0 $ $ # #+ <@!8!	!4 i F2
$ + +rA   r   c                     ^  \ rS rSrSr    SU 4S jjr    S         SS jjr\SS j5       r\SS j5       rSU 4S jjr    SS jr	SS	 jr
S
rU =r$ )	TracebackiC  zQTraceback objects encapsulate and offer higher level access to Traceback entries.c                   > [        U[        5      (       a  SS jn[        TU ]  U" U5      5        g[        TU ]  U5        g)z@Initialize from given python traceback object and ExceptionInfo.c              3  T   #    U nUb  [        U5      v   UR                  nUb  M  g g 7fr;   )r   tb_next)curcur_s     r>   fTraceback.__init__.<locals>.fM  s,     -0&(..<<D &s   "((N)r   r   rm   zIterable[TracebackEntry])
isinstancer   superr?   )r<   tbr   	__class__s      r>   r?   Traceback.__init__F  s7    
 b-((( GQrU#GR rA   c                   Uc  SO[         R                  " U5      nUc  SO[         R                  " U5      nU  H  nUR                  R                  nUR                  n	Ub  [        U	5      U:w  a  M9  Ub.  [        U	[        5      (       a  US U	R                   5       ;   a  Mj  Ub  UR                  U:w  a  M  Ub&  UR                  R                  R                  U:w  a  M  [        UR                  5      s  $    U $ )ap  Return a Traceback instance wrapping part of this Traceback.

By providing any combination of path, lineno and firstlineno, the
first frame to start the to-be-returned traceback is determined.

This allows cutting the first part of a Traceback instance e.g.
for formatting reasons (removing some uninteresting bits that deal
with handling of the exception/traceback).
Nc              3  8   #    U  H  n[        U5      v   M     g 7fr;   )rs   ).0rZ   s     r>   	<genexpr> Traceback.cut.<locals>.<genexpr>q  s     $F5ESVV5Es   )osfspathr   r   r[   rs   r   r   parentsr   rO   r   r   )
r<   r[   r   rO   excludepathpath_excludepath_xr   codepaths
             r>   cutTraceback.cutW  s      "))D/*2t		+8NA77<<DyyHCMU$:'x.. $FX5E5E$FF!ahh&&8&177<<+C+C{+RQ[[))   rA   c                    g r;   r   r<   r   s     r>   __getitem__Traceback.__getitem__{  s    ADrA   c                    g r;   r   r  s     r>   r  r  ~  s    47rA   c                   > [        U[        5      (       a  U R                  [        TU ]  U5      5      $ [        TU ]  U5      $ r;   )r   slicer   r   r  )r<   r   r   s     r>   r  r    s9    c5!!>>%'"5c":;;7&s++rA   c               h   ^ [        T[        5      (       a  U4S jnOTn[        [        X 5      5      $ )ag  Return a Traceback instance with certain items removed.

If the filter is an `ExceptionInfo`, removes all the ``TracebackEntry``s
which are hidden (see ishidden() above).

Otherwise, the filter is a function that gets a single argument, a
``TracebackEntry`` instance, and should return True when the item should
be added to the ``Traceback``, False when not.
c                0   > U R                  T5      (       + $ r;   )r   )r  excinfo_or_fns    r>   <lambda>"Traceback.filter.<locals>.<lambda>  s    qzz-88rA   )r   ExceptionInfor   filter)r<   r  fns    ` r>   r  Traceback.filter  s,     m]338BB)**rA   c                   0 n[        U 5       H  u  p#UR                  R                  R                  [	        UR                  R                  R
                  5      UR                  4nUR                  U/ 5      n[        UR                  R                  5      nU(       a  U H  nXv:X  d  M
  Us  s  $    UR                  U5        M     g)zvReturn the index of the frame/TracebackEntry where recursion originates if
appropriate, None if no recursion occurred.N)	enumerater   r   r[   idr9   r   
setdefaultdictr   r   )r<   cacheientryr   valueslocotherlocs           r>   recursionindexTraceback.recursionindex  s     CE!$HA
 ++""''EKK,<,<,@,@)A5<<OC%%c2.Fu{{++,C &H  !' MM# ( rA   r   )r   z(TracebackType | Iterable[TracebackEntry]rm   rn   )NNNN)
r[   zos.PathLike[str] | str | Noner   
int | NonerO   r(  r  zos.PathLike[str] | Nonerm   r   )r   r   rm   r   )r   r  rm   r   )r   zSupportsIndex | slicerm   zTracebackEntry | Traceback)r  z?ExceptionInfo[BaseException] | Callable[[TracebackEntry], bool]rm   r   )rm   r(  )rz   r{   r|   r}   r~   r?   r	  r   r  r  r&  r   __classcell__r   s   @r>   r   r   C  s    [!4! 
!& /3!"&/3"+" "  	"
 -" 
"H D D7 7,+V+ 
	+( rA   r   ET)bound	covariantc                  F   \ rS rSr% SrSrS\S'   S\S'   S\S	'   S
\S'     S&SS.         S'S jjjr\ S(     S)S jj5       r	\ S(     S*S jj5       r
\S(S+S jj5       r\S,S j5       rS-S jr\S.S j5       r\S/S j5       r\S0S j5       r\S1S j5       r\S2S j5       r\R(                  S3S j5       rS1S jrS4S5S jjrS6S jrS7S jr        S8                 S9S jjrS:S  jrS;S! jr  S<           S=S" jjrSSS#.       S>S$ jjrS%rg)?r  i  zJWraps sys.exc_info() objects and offers help for navigating the traceback.zAssertionError('assert r   _assert_start_repr'tuple[type[E], E, TracebackType] | None_excinfors   
_striptextTraceback | None
_tracebackNF	_ispytestc               >    [        U5        Xl        X l        X0l        g r;   )r(   r1  r2  r4  )r<   r   	striptext	tracebackr6  s        r>   r?   ExceptionInfo.__init__  s     	y!##rA   c                    UR                   (       d   S5       e[        U5      XR                   4nU R                  X25      $ )a  Return an ExceptionInfo for an existing exception.

The exception must have a non-``None`` ``__traceback__`` attribute,
otherwise this function fails with an assertion error. This means that
the exception must have been raised, or added a traceback with the
:py:meth:`~BaseException.with_traceback()` method.

:param exprinfo:
    A text string helping to determine if we should strip
    ``AssertionError`` from the output. Defaults to the exception
    message/``__str__()``.

.. versionadded:: 7.4
zTExceptions passed to ExcInfo.from_exception(...) must have a non-None __traceback__.)__traceback__typefrom_exc_info)rC   	exceptionexprinfoexc_infos       r>   from_exceptionExceptionInfo.from_exception  sF    . && 	
3	
& OY0G0GH  44rA   c                    SnUcb  [        US   [        5      (       aJ  [        US   SS5      nUc  [        US   5      nU(       a"  UR	                  U R
                  5      (       a  SnU " XSS9$ )z@Like :func:`from_exception`, but using old-style exc_info tuple.rV   NrL   msgzAssertionError: Tr5  )r   AssertionErrorgetattrr&   
startswithr/  )rC   rA  r@  r2  s       r>   r>  ExceptionInfo.from_exc_info  sp     

8A; G Gx{E48H#HQK0H//0F0FGG/
8488rA   c                    [         R                  " 5       nUS   c   S5       eUS   c   S5       eUS   c   S5       eUS   US   US   4n[        R                  X15      $ )a  Return an ExceptionInfo matching the current traceback.

.. warning::

    Experimental API

:param exprinfo:
    A text string helping to determine if we should strip
    ``AssertionError`` from the output. Defaults to the exception
    message/``__str__()``.
r   zno current exceptionrL      )sysrA  r  r>  )rC   r@  tuprA  s       r>   from_currentExceptionInfo.from_current  sz     lln1v!9#99!1v!9#99!1v!9#99!FCFCF+**8>>rA   c                    U " SSS9$ )z!Return an unfilled ExceptionInfo.NTr5  r   )rC   s    r>   	for_laterExceptionInfo.for_later  s     44((rA   c                8    U R                   b   S5       eXl         g)z<Fill an unfilled ExceptionInfo created with ``for_later()``.Nz ExceptionInfo was already filledr1  )r<   rA  s     r>   fill_unfilledExceptionInfo.fill_unfilled  s    }}$H&HH$ rA   c                H    U R                   c   S5       eU R                   S   $ )zThe exception class.z6.type can only be used after the context manager exitsr   rT  rN   s    r>   r=  ExceptionInfo.type  s/     MM%	DC	D%}}QrA   c                H    U R                   c   S5       eU R                   S   $ )zThe exception value.z7.value can only be used after the context manager exitsrL   rT  rN   s    r>   r3   ExceptionInfo.value   s/     MM%	ED	E%}}QrA   c                H    U R                   c   S5       eU R                   S   $ )zThe exception raw traceback.z4.tb can only be used after the context manager exitsrK  rT  rN   s    r>   r   ExceptionInfo.tb(  s/     MM%	BA	B%}}QrA   c                V    U R                   c   S5       eU R                  R                  $ )zThe type name of the exception.z:.typename can only be used after the context manager exits)r1  r=  rz   rN   s    r>   typenameExceptionInfo.typename0  s0     MM%	HG	H%yy!!!rA   c                h    U R                   c  [        U R                  5      U l         U R                   $ )zThe traceback.)r4  r   r   rN   s    r>   r9  ExceptionInfo.traceback8  s(     ??"'0DOrA   c                    Xl         g r;   )r4  )r<   r3   s     r>   r9  ra  ?  s    rA   c                    U R                   c  gSU R                  R                   S[        U R                   S   5       S[	        U R
                  5       S3$ )Nz)<ExceptionInfo for raises contextmanager>< rL   z tblen=>)r1  r   rz   r&   lenr9  rN   s    r>   r   ExceptionInfo.__repr__C  sS    == >4>>**+1XdmmA6F-G,HPSTXTbTbPcOddeffrA   c                   [        U R                  U R                  5      nSR                  U5      nUR	                  5       nU(       a8  UR                  U R                  5      (       a  U[        U R                  5      S nU$ )zReturn the exception as a string.

When 'tryshort' resolves to True, and the exception is an
AssertionError, only the actual exception part of the exception
representation is returned (so 'AssertionError: ' is removed from
the beginning).
rV   N)r   r=  r3   joinrstriprH  r2  rg  )r<   tryshortlinestexts       r>   exconlyExceptionInfo.exconlyH  sa     &dii<wwu~{{}t//C023rA   c                .    [        U R                  U5      $ )zpReturn True if the exception is an instance of exc.

Consider using ``isinstance(excinfo.value, exc)`` instead.
)r   r3   )r<   excs     r>   errisinstanceExceptionInfo.errisinstanceX  s    
 $**c**rA   c                N   [        S[        U R                  5      * S-
  S5       H}  nU R                  U   nUR                  U 5      (       a  M*  UR                  R
                  R                  R                  UR                  pCU R                  SS9n[        X4S-   U5      s  $    g )NrL   Trl  )rangerg  r9  r   r   r   r9   rW   r   ro  ReprFileLocation)r<   r!  r"  r[   r   ro  s         r>   _getreprcrashExceptionInfo._getreprcrash_  s     rC//!3R8ANN1%E>>$''${{//33??f,,,5'qj'BB 9 rA   c	                :   US:X  au  [        [        [        R                  " U R                  U R
                  U R                  (       a  U R                  S   R                  OS5      5      U R                  5       S9$ [        UUUUUUUUS9n	U	R                  U 5      $ )a:  Return str()able representation of this exception info.

:param bool showlocals:
    Show locals per traceback entry.
    Ignored if ``style=="native"``.

:param str style:
    long|short|line|no|native|value traceback style.

:param bool abspath:
    If paths should be changed to absolute or left unchanged.

:param tbfilter:
    A filter for traceback entries.

    * If false, don't hide any entries.
    * If true, hide internal entries and entries that contain a local
      variable ``__tracebackhide__ = True``.
    * If a callable, delegates the filtering to the callable.

    Ignored if ``style`` is ``"native"``.

:param bool funcargs:
    Show fixtures ("funcargs" for legacy purposes) per traceback entry.

:param bool truncate_locals:
    With ``showlocals==True``, make sure locals can be safely represented as strings.

:param bool truncate_args:
    With ``showargs==True``, make sure args can be safely represented as strings.

:param bool chain:
    If chained exceptions in Python 3 should be shown.

.. versionchanged:: 3.9

    Added the ``chain`` parameter.
r2   r   Nreprtraceback	reprcrash)
showlocalsstyleabspathtbfilterfuncargstruncate_localstruncate_argschain)
ReprExceptionInfoReprTracebackNativer9  format_exceptionr=  r3   r   rz  FormattedExcinforepr_excinfo)
r<   r  r  r  r  r  r  r  r  fmts
             r>   getreprExceptionInfo.getreprj  s    d H$1..		

7;~~q)334 ,,.	 	 !+'	
 %%rA   c                    [        US/ 5      nSR                  [        U5      /UQ5      $ ! [         aU    [        [        R                  R	                  SS 5      SS5      n[        R
                  S:  a  [        X5      (       a  / n Nze f = f)N	__notes__zurllib.error	HTTPErrorr   )r+      
)	rG  r   rL  modulesr   version_infor   rj  rs   )r<   rr  notesr  s       r>   _stringify_exception"ExceptionInfo._stringify_exception  s    		Cb1E yyC
 	
  	   E{TVWI')j.H.H	s   , AB	Bc                    SnU R                  U R                  5      nSU< SU< 3nX:X  a  US-  n[        R                  " X5      (       d   U5       eg)zCheck whether the regular expression `regexp` matches the string
representation of the exception using :func:`python:re.search`.

If it matches `True` is returned, otherwise an `AssertionError` is raised.
Tz%Regex pattern did not match.
 Regex: z	
 Input: z*
 Did you mean to `re.escape()` the regex?)r  r3   research)r<   regexpr   r3   rE  s        r>   matchExceptionInfo.match  s]     !))$**56vj
5)T?@@Cyy'',,'rA   c           	     :   Ub  XT:  a  gUR                    H  n[        U[        5      (       a  U R                  XbX4US-   5      (       a    gUb  XT:w  a  M?  [        Xb5      (       d  MQ  Ub.  U R	                  U5      n[
        R                  " X75      (       d  M    g   g)zFReturn `True` if a `BaseExceptionGroup` contains a matching exception.FrL   T)
exceptionsr   r-   _group_containsr  r  r  )r<   	exc_groupexpected_exceptionr  target_depthcurrent_depthrr  r3   s           r>   r  ExceptionInfo._group_contains  s     $=+G''C#122''U-RSBS   (}/Lc66 11#6yy.. (  rA   )r  depthc                   Sn[        U R                  [        5      (       d   U5       eSnUb  US:  d   U5       eU R                  U R                  XU5      $ )a  Check whether a captured exception group contains a matching exception.

:param Type[BaseException] | Tuple[Type[BaseException]] expected_exception:
    The expected exception type, or a tuple if one of multiple possible
    exception types are expected.

:param str | Pattern[str] | None match:
    If specified, a string containing a regular expression,
    or a regular expression object, that is tested against the string
    representation of the exception and its `PEP-678 <https://peps.python.org/pep-0678/>` `__notes__`
    using :func:`re.search`.

    To match a literal string that may contain :ref:`special characters
    <re-syntax>`, the pattern can first be escaped with :func:`re.escape`.

:param Optional[int] depth:
    If `None`, will search for a matching exception at any nesting depth.
    If >= 1, will only match an exception if it's at the specified depth (depth = 1 being
    the exceptions contained within the topmost exception group).

.. versionadded:: 8.0
z=Captured exception is not an instance of `BaseExceptionGroup`z!`depth` must be >= 1 if specifiedrL   )r   r3   r-   r  )r<   r  r  r  rE  s        r>   group_containsExceptionInfo.group_contains  s\    : N$**&899>3>915A:33.##DJJ0B5QQrA   )r1  r2  r4  )rV   N)
r   r0  r8  rs   r9  r3  r6  ry   rm   rn   r;   )r?  r+  r@  
str | Nonerm   ExceptionInfo[E])rA   tuple[type[E], E, TracebackType]r@  r  rm   r  )r@  r  rm   ExceptionInfo[BaseException])rm   r  )rA  r  rm   rn   )rm   ztype[E])rm   r+  )rm   r   rr   )rm   r   )r3   r   rm   rn   rx   )rl  ry   rm   rs   )rr  EXCEPTION_OR_MORErm   ry   )rm   ReprFileLocation | None)Fr.   FTFTTT)r  ry   r  TracebackStyler  ry   r  zMbool | Callable[[ExceptionInfo[BaseException]], _pytest._code.code.Traceback]r  ry   r  ry   r  ry   r  ry   rm   z&ReprExceptionInfo | ExceptionChainRepr)rr  r   rm   rs   )r  zstr | Pattern[str]rm   zLiteral[True]rK   )r  z!BaseExceptionGroup[BaseException]r  r  r  str | Pattern[str] | Noner  r(  r  rq   rm   ry   )r  r  r  r  r  r(  rm   ry   )rz   r{   r|   r}   r~   r/  __annotations__r?   r   rB  r>  rN  rQ  rU  r   r=  r3   r   r^  r9  setterr   ro  rs  rz  r  r  r  r  r  r   r   rA   r>   r  r    s    U#<<55O  
 &*	$  $8$ $ $	$ $ 
$   $5
 5 5 
5 5:   $929 9 
	9 9  ? ?& ) )!
             " "      g
 +	 ! &SW $"H&H& H& 	H&
QH& H& H& H& H& 
0H&T
&( $(4 . )	
 !  
D ,0 !R-!R )	!R
 !R 
!R !RrA   r  c                     \ rS rSr% SrSrS\S'   SrS\S'   SrS	\S
'   Sr	S\S'   Sr
S	\S'   SrS\S'   SrS	\S'   SrS	\S'   SrS	\S'   SrS	\S'   \R"                  " \SSS9rS\S'   S&S jrS'S jrS(S jr   S)         S*S jjr  S+       S,S jjrS-S jr S.     S/S  jjrS0S! jrS1S" jr    S2S# jrS3S$ jrS%rg)4r  i  z>Presenting information about failing Functions and Generators.rf  r   flow_markerr+  fail_markerFry   r  r.   r  r  Tr  z:bool | Callable[[ExceptionInfo[BaseException]], Traceback]r  r  r  r  r  )default_factoryinitr   zdict[str | Path, ast.AST]r   c                (    [        UR                  [        U5      S-
  5      5      nS[        U5      [        UR                  5       5      -
  -   $ ! [         a    e [         a-     [        US   5      n NM! [         a    e [         a      gf = ff = f)NrL   rv  r      )rs   r   rg  r   r   r   )r<   rc   ss      r>   
_getindentFormattedExcinfo._getindent,  s    
	F''Fa89A CFS_,-- ! 	 	r
O$   	s)   &A B%A55B	BBBc                b    UR                  U R                  5      nUb  UR                  5       nU$ r;   )r   r   deindent)r<   r"  rc   s      r>   _getentrysource FormattedExcinfo._getentrysource;  s+    /__&FrA   c                    U R                   (       ah  / nUR                  R                  SS9 H>  u  p4U R                  (       a  [	        U5      nO
[	        US S9nUR                  X545        M@     [        U5      $ g )NT)ri   )maxsize)r  r   rk   r  r&   r   ReprFuncArgs)r<   r"  argsargnameargvaluestr_reprs         r>   	repr_argsFormattedExcinfo.repr_argsA  sl    ==D%*[[%8%8T%8%B!%%'1H'$?HW/0 &C  %%rA   Nc                   / nUb  US:  a  U[        U5      -  nUb  U[        UR                  5      :  d  US:  a  [        S5      nSnSnU(       a/  UR                  XaR                  U   R	                  5       -   5        OUR                  SU  H  nUR                  Xg-   5        M     UR                  U R
                  S-   UR                  U   -   5        UR                  US-   S  H  nUR                  Xg-   5        M     Ub9  U(       a  SOU R                  U5      nUR                  U R                  X8SS	95        U$ )
z,Return formatted and marked up source lines.Nr   r   z       rL   r  T)indentmarkall)	rg  rm  r"   r   stripr  r  extendget_exconly)	r<   rc   
line_indexr   r/   rm  space_prefixr0   r  s	            r>   
get_sourceFormattedExcinfo.get_sourceM  s"    *q.#f+%J>Z3v||+<<
Q E]FJLLZ(@(F(F(HHI[j1\01 2LL))E1FLL4LLMZ!^%56\01 7QT__V%<FLL))'$)OPrA   c                    / nSU-  nUR                  SS9R                  S5      nU R                  USS  -   nU H!  nUR                  Xx-   5        U(       a  M  UnM#     U$ )Nre  Trw  r  rL   )ro  splitr  r   )	r<   r   r  r  rm  	indentstrexlines
failindentr0   s	            r>   r  FormattedExcinfo.get_exconlyk  sm     &L	//4/066t<%%	!"5
DLL*+7&
  rA   c                l   U R                   (       a  / nU Vs/ s H  o3S   S:w  d  M  UPM     nnUR                  5         U H_  nX   nUS:X  a  UR                  S5        M   U R                  (       a  [	        U5      nO[        U5      nUR                  US SU 35        Ma     [        U5      $ g s  snf )Nr   @__builtins__z__builtins__ = <builtins>z<10 = )r  sortr   r  r&   r$   
ReprLocals)r<   r   rm  r$  keysrS   r3   r  s           r>   repr_localsFormattedExcinfo.repr_locals|  s    ??E#);6CVs]C6D;IIK>)LL!<=
 ++#+E?#-e#4LLD:S
!;< $ e$$+ <s
   B1B1c                   / nUb  UR                   b  UR                   OU R                  nUS;   Ga  UGb  U R                  U5      nUc  [        S5      nSnOUR                  UR                  5       -
  nUS:H  nU(       d  U R                  U5      OS nU R                  XVX'S9n	UR                  U	5        U(       a  SUR                   3n
OU=(       a    UR                  =(       d    Sn
UR                  nU R                  U5      n[        XR                  S-   U
5      nU R                  UR                  5      n[!        X8XU5      $ US	:X  aI  U(       a3  UR                  [#        UR$                  5      R'                  S
5      5        [!        US S S U5      $ U(       a  UR                  U R)                  USS95        [!        US S S U5      $ )N)r/   r.   r   r   r/   )r/   zin rV   rL   r3   r  r  r  )r   r  r  r"   r   r   r  r  r  rS   r^  r[   	_makepathry  r  r   	ReprEntryrs   r3   r  r  )r<   r"  r   rm  r  rc   r  r/   reprargsr  message
entry_pathr[   reprfileloc
localsreprs                  r>   repr_traceback_entry%FormattedExcinfo.repr_traceback_entry  s   
   U%6%6%B  	
 %%%*;))%0F~
"\\E,D,D,FF
W$E49t~~e,tHGIALLO

|,!6g&6&6<"J>>*-D*41A7KK))%,,7JUjuMMgS/55d;<UD$e<<T--ga-@AUD$e<<rA   c                    U R                   (       dX  [        U[        5      (       aC   [        [        R                  " 5       U5      n[        U5      [        [        U5      5      :  a  U$ [        U5      $ ! [
         a    [        U5      s $ f = fr;   )r  r   r   r*   cwdrY   rs   rg  )r<   r[   nps      r>   r  FormattedExcinfo._makepath  sl    ||
4 6 6! T2 2wSY'	4y	  !4y !s   A5 5BBc                   UR                   n[        U R                  5      (       a  U R                  U5      nO#U R                  (       a  UR                  " U5      n[	        UR
                  [        5      (       a  U R                  U5      u  p#OS nU(       d,  Uc  SnU R                  S U5      /n[        XCU R                  S9$ US   nU R                  S:X  a'  U R                  XQ5      /n[        US U R                  S9$ U Vs/ s H  nU R                  XeU:X  a  UOS 5      PM     nn[        XCU R                  S9$ s  snf )NzXAll traceback entries are hidden. Pass `--full-trace` to see hidden and internal frames.)r  rv  r3   )r9  r   r  r  r   r3   RecursionError_truncate_recursive_tracebackr  ReprTracebackr  )r<   r   r9  	extralineentrieslastr"  s          r>   repr_tracebackFormattedExcinfo.repr_traceback  s(   %%	DMM""g.I]]!((1Igmm^44#'#E#Ei#P IyI v	00w?@G 4::FF}:: 00?@G $djjAA #
" %%eW4P" 	 
 WtzzBB	
s   #D=c                     UR                   " 5       nUb  SnUSUS-    nX4$ Sn X4$ ! [         aE  nSnS[        U5      R                   SU< SU S[	        U5       S	3	nUSU X* S -   n SnAX4$ SnAff = f)
a  Truncate the given recursive traceback trying to find the starting
point of the recursion.

The detection is done by going through each traceback entry and
finding the point in which the locals of the frame are equal to the
locals of a previous frame (see ``recursionindex()``).

Handle the situation where the recursion process might raise an
exception (for example comparing numpy arrays using equality raises a
TypeError), in which case we do our best to warn the user of the
error and show a limited traceback.
Nz/!!! Recursion detected (same locals & position)rL   
   z!!! Recursion error detected, but an error occurred locating the origin of recursion.
  The following exception happened when comparing locals in the stack frame:
    : z
  Displaying first and last z stack frames out of .)r&  r   r=  rz   rg  )r<   r9  r&  r  e
max_framess         r>   r  .FormattedExcinfo._truncate_recursive_traceback  s    	!&557N )M	%&:(:;	 ## !	##%  
	IJAw''(1% 0//9l:OPST]P^O__`b  "+:.;<1HHI ##%
	Is   ) 
A89A33A8c                   / nUR                   nUnS n[        5       nUGb  [        U5      U;  Ga  UR                  [        U5      5        U(       a  [	        U[
        5      (       aV  [        [        R                  " [        UR                   5      UR                   UR                  S   R                  5      5      nOU R                  U5      nUR                  5       nO,[        [        R                  " [        U5      US 5      5      nS nX'X4/-  nUR                  bH  U R                  (       a7  UR                  nUR                  (       a  [         R#                  U5      OS nSnOhUR$                  bY  UR&                  (       dH  U R                  (       a7  UR$                  nUR                  (       a  [         R#                  U5      OS nSnOS nUb  [        U5      U;  a  GM  UR)                  5         [+        U5      $ )Nr   zDThe above exception was the direct cause of the following exception:zCDuring handling of the above exception, another exception occurred:)r3   setr  addr   r-   r  r9  r  r=  r   r  rz  	__cause__r  r<  r  rB  __context____suppress_context__reverseExceptionChainRepr)	r<   r   
repr_chainr  excinfo_descrseenr~  r  s	            r>   r  FormattedExcinfo.repr_excinfo
  s   VX
")--8?m1T 1HHRUO a!344+%66 $X^^ 4 ( ( 2 21 5 ? ? " %)$7$7$AM$224	 !4..tAw4@! !	9<==J{{&4::KK>?oo=77:SW^)!2H2HTZZMM>?oo=77:SW]Q m1T 1R 	!*--rA   r   )rc   r"   rm   rq   )r"  r   rm   rv   )r"  r   rm   ReprFuncArgs | None)rv  NF)
rc   rv   r  rq   r   r   r/   ry   rm   	list[str])r  F)r   r  r  rq   r  ry   rm   r  )r   zMapping[str, object]rm   ReprLocals | Noner;   )r"  zTracebackEntry | Noner   r   rm   r  )r[   ru   rm   rs   )r   r  rm   r  )r9  r   rm   ztuple[Traceback, str | None])r   r  rm   r  ) rz   r{   r|   r}   r~   r  r  r  r  r  r  r  r  r  r  r  dataclassesfieldr  r   r  r  r  r  r  r  r  r  r  r  r  r   r   rA   r>   r  r    s`   H  KKJ"E>"GTKOHHOHd OT M4E4*5*;*;5u+H' .
 7;  5	
  
B 	-  	
 
": 8<&=$&= 5&= 
	&=PC:#$"#$	%#$J0.rA   r  F)eqc                  2    \ rS rSrSS jrSS jrSS jrSrg)	TerminalRepri=  c                    [        5       n[        US9nU R                  U5        UR                  5       R	                  5       $ )N)file)r   r#   
toterminalgetvaluer  )r<   iotws      r>   r   TerminalRepr.__str__?  s6     Z${{}""$$rA   c                <    SU R                    S[        U 5      S S3$ )Nrd  z instance at 0xrf  )r   r  rN   s    r>   r   TerminalRepr.__repr__G  s"    4>>"-4}A>>rA   c                    [        5       er;   )NotImplementedErrorr<   r   s     r>   r  TerminalRepr.toterminalJ  s    !##rA   r   Nrr   r   r#   rm   rn   )rz   r{   r|   r}   r   r   r  r   r   rA   r>   r  r  =  s    %?$rA   r  c                  n    \ rS rSr% S\S'   S\S'   \R                  " S\S9rS\S	'   SSS
 jjr	SS jr
Srg)ExceptionRepriO  r  r~  r  r  F)r  r  zlist[tuple[str, str, str]]sectionsc                >    U R                   R                  XU45        g r;   )r,  r   )r<   rS   contentseps       r>   
addsectionExceptionRepr.addsectionX  s    dS12rA   c                t    U R                    H(  u  p#nUR                  XB5        UR                  U5        M*     g r;   )r,  r/  r0   )r<   r   rS   r.  r/  s        r>   r  ExceptionRepr.toterminal[  s-    "&--D3FF3GGG #0rA   r   N)-)rS   rs   r.  rs   r/  rs   rm   rn   r)  )rz   r{   r|   r}   r  r  r  listr,  r0  r  r   r   rA   r>   r+  r+  O  s7     ! &&+6+<+<D,H( 3rA   r+  c                  P   ^  \ rS rSr% S\S'       SU 4S jjrSU 4S jjrSrU =r$ )	r  ia  CSequence[tuple[ReprTraceback, ReprFileLocation | None, str | None]]r  c                F   > [         TU ]  US   S   US   S   S9  Xl        g )Nrv  r   rL   r}  )r   r?   r  )r<   r  r   s     r>   r?   ExceptionChainRepr.__init__e  s4     	)A,Bil 	 	
 
rA   c                   > U R                    HC  nUS   R                  U5        US   c  M  UR                  S5        UR                  US   SS9  ME     [        TU ]  U5        g )Nr   rK  rV   T)yellow)r  r  r0   r   )r<   r   elementr   s      r>   r  ExceptionChainRepr.toterminalq  s[    zzGAJ!!"%qz%
40	 "
 	2rA   )r  )r  r7  rm   rn   r)  )	rz   r{   r|   r}   r  r?   r  r   r)  r*  s   @r>   r  r  a  s*    NN
R
 

 rA   r  c                  B   ^  \ rS rSr% S\S'   S\S'   SU 4S jjrSrU =r$ )	r  iz  r  r~  r  r  c                Z   > U R                   R                  U5        [        TU ]  U5        g r;   )r~  r  r   )r<   r   r   s     r>   r  ReprExceptionInfo.toterminal  s$    %%b)2rA   r   r)  )rz   r{   r|   r}   r  r  r   r)  r*  s   @r>   r  r  z  s      && rA   r  c                  L    \ rS rSr% S\S'   S\S'   S\S'   SrS	\S
'   SS jrSrg)r  i  z%Sequence[ReprEntry | ReprEntryNative]reprentriesr  r  r  r  z_ r   entrysepc                   [        U R                  5       H  u  p#UR                  S:X  a  UR                  S5        UR	                  U5        U[        U R                  5      S-
  :  d  MU  U R                  US-      nUR                  S:X  d$  UR                  S:X  d  M  UR                  S:X  d  M  UR                  U R                  5        M     U R                  (       a  UR                  U R                  5        g g )Nr.   rV   rL   r/   )	r  rB  r  r0   r  rg  r/  rC  r  )r<   r   r!  r"  
next_entrys        r>   r  ReprTraceback.toterminal  s    !$"2"23HA{{f$R 3t''(1,,!--a!e4
KK6){{g-"((F2FF4==) 4 >>GGDNN# rA   r   Nr)  )rz   r{   r|   r}   r  rC  r  r   r   rA   r>   r  r    s#    66Hh$rA   r  c                      \ rS rSrSS jrSrg)r  i  c                B    [        U5      /U l        S U l        SU l        g )Nr2   )ReprEntryNativerB  r  r  )r<   tbliness     r>   r?   ReprTracebackNative.__init__  s     +G45
rA   )r  rB  r  N)rJ  Sequence[str]rm   rn   )rz   r{   r|   r}   r?   r   r   rA   r>   r  r    s    rA   r  c                  8    \ rS rSr% S\S'   SrS\S'   S
S jrSrg	)rI  i  rL  rm  r2   zClassVar[TracebackStyle]r  c                X    UR                  SR                  U R                  5      5        g )NrV   )writerj  rm  r'  s     r>   r  ReprEntryNative.toterminal  s    
$%rA   r   Nr)  )rz   r{   r|   r}   r  r  r  r   r   rA   r>   rI  rI    s    &.E#.&rA   rI  c                  f    \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
\S'   SS jrSS jrSS jrSrg)r  i  rL  rm  r  reprfuncargsr  
reprlocalsr  r  r  r  c                L   U R                   (       d  gU R                  S:X  a6  U R                    H%  nUR                  U5        UR                  S5        M'     g[        R                   S3n[        U5      n/ n/ n/ n[        U R                   5       Hd  u  pUR                  U5      n	U	(       a   UR                  U R                   US 5          O+UR                  USU 5        UR                  X$S 5        Mf     UR                  Xe5        U H  nUR                  USSS9  M     g)a  Write the source code portions of a list of traceback entries with syntax highlighting.

Usually entries are lines like these:

    "     x = 1"
    ">    assert x == 2"
    "E    assert 1 == 2"

This function takes care of rendering the "source" portions of it (the lines without
the "E" prefix) using syntax highlighting, taking care to not highlighting the ">"
character, as doing so might break line continuations.
Nr3   r  r  Tboldred)rm  r  rO  r  r  rg  r  rH  r  r   _write_sourcer0   )
r<   r   r0   r  indent_sizeindentssource_linesfailure_linesindexis_failure_lines
             r>   _write_entry_linesReprEntry._write_entry_lines  s	    zz::  

 # 
 *556c:+&"$#%$TZZ0KE"ook:O$$TZZ%78tL[12##D$67 1 	/ "DGGDtG. "rA   c                   U R                   S:X  ai  U R                  (       a  U R                  R                  U5        U R                  U5        U R                  (       a  U R                  R                  USS9  g U R
                  (       a  U R
                  R                  U5        U R                  U5        U R                  (       a,  UR                  S5        U R                  R                  U5        U R                  (       a>  U R                  (       a  UR                  S5        U R                  R                  U5        g g )Nr/   z        r  rV   )r  r  r  r_  rS  rR  r0   rm  r'  s     r>   r  ReprEntry.toterminal  s    ::   ++B/##B'**2g*>((,#??GGBKOO&&r*zz''+ rA   c                    SR                  SR                  U R                  5      U R                  U R                  5      $ )Nz{}
{}
{}r  )formatrj  rm  rS  r  rN   s    r>   r   ReprEntry.__str__  s3    ""IIdjj!4??D4D4D
 	
rA   r   Nr)  rr   )	rz   r{   r|   r}   r  r_  r  r   r   r   rA   r>   r  r    s0    %%!!((//b,,
rA   r  c                  H    \ rS rSr% S\S'   S\S'   S\S'   SS jrSS jrS	rg
)ry  i  rs   r[   rq   r   r  c                8    [        U R                  5      U l        g r;   )rs   r[   rN   s    r>   __post_init__ReprFileLocation.__post_init__  s    		N	rA   c                    U R                   nUR                  S5      nUS:w  a  US U nUR                  U R                  SSS9  UR	                  SU R
                   SU 35        g )Nr  rv  TrU  :r  )r  findrO  r[   r0   r   )r<   r   rE  r!  s       r>   r  ReprFileLocation.toterminal  s_     llHHTN7bq'C
40
!DKK=3%()rA   )r[   N)rm   rn   r)  )rz   r{   r|   r}   r  rh  r  r   r   rA   r>   ry  ry    s    
IKL#*rA   ry  c                  .    \ rS rSr% S\S'   SSS jjrSrg)	r  i  rL  rm  c                P    U R                    H  nUR                  X#-   5        M     g r;   )rm  r0   )r<   r   r  r0   s       r>   r  ReprLocals.toterminal  s    JJDGGFM" rA   r   N)rV   r)  rz   r{   r|   r}   r  r  r   r   rA   r>   r  r    s    # #rA   r  c                  *    \ rS rSr% S\S'   SS jrSrg)r  i"  zSequence[tuple[str, object]]r  c                d   U R                   (       a  SnU R                    Hc  u  p4U SU 3n[        U5      [        U5      -   S-   UR                  :  a  U(       a  UR                  U5        UnMP  U(       a
  USU-   -  nMa  UnMe     U(       a  UR                  U5        UR                  S5        g g )NrV   r  rK  z, )r  rg  	fullwidthr0   )r<   r   	linesofarrS   r3   nss         r>   r  ReprFuncArgs.toterminal&  s    99I#yyvS(r7S^+a/",,> 	* "I !TBY.	$&	  ) 	"GGBK rA   r   Nr)  rq  r   rA   r>   r  r  "  s    
&&rA   r  c                   [        U 5      n [        U S5      (       a  U R                  n  [        R	                  U 5      nUR                  UR                  4$ ! [
         a     [        R                  " U 5      =(       d    [        R                  " U 5      nO! [
         a      gf = fU=(       a    [        U5      =(       d    SnSnU(       a   [        U 5      u  pTO! [         a     Of = fX44s $ f = f)zReturn source location (path, lineno) for the given object.

If the source cannot be determined return ("", -1).

The line number is 0-based.
place_as)rV   rv  rV   rv  )r'   hasattrry  r6   rD   	TypeErrorinspectgetsourcefilegetfiler)   r   rY   r[   rO   )r=   r   r  r  r   r_   s         r>   getfslinenor  9  s     
CsJll!!#&  99d&&&&  	&&s+Cws/CB 		 (R(.B&sO	6 ~sY   A 
C2"3BC2
B$ C2#B$$)C2CC2
C)&C2(C))C21C2ocz__init__.pyc                    U R                   R                  R                  R                  nSU;   =(       a    SU;   nU(       a  g[	        U R
                  5      nUR                  n[        U;   a  g[        U;   a  gg)zReturn True if a TracebackEntry instance should be included in tracebacks.

We hide traceback entries of:

* dynamically generated code (no code to show up for it);
* internal traceback from pytest or its internal libraries, py and pluggy.
rd  rf  FT)	r   r   r9   rW   r   r[   r  _PLUGGY_DIR_PYTEST_DIR)r"  raw_filenameis_generatedrZ   r  s        r>   filter_tracebackr  g  sk     ;;##''33L,&>3,+>L 	UZZAiiGggrA   )r=   ro   rm   ztuple[str | Path, int])r"  r   rm   ry   )[
__future__r   astr  r|  r   r   r  r   r  pathlibr   r  rL  r9  r   typesr	   r
   r   typingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   pluggy_pytest_pytest._code.sourcer   r    r!   r"   _pytest._ior#   _pytest._io.safereprr$   r&   _pytest.compatr'   _pytest.deprecatedr(   _pytest.pathlibr)   r*   r  exceptiongroupr-   r  r   r  r6   r   r   r   r+  	dataclassr  r  r  r+  r  r  r  r  rI  r  ry  r  r  r  __file__rk  r  rS   parentr  r  r   rA   r>   <module>r     sS   " 
    "  	  	 
  +                         + + 6 ' & + ) ( - ( ' g1QR$}-uT-5H#5M/NNO B* B*J; ;|+ +Dj^$ jZ C}5 `RGAJ `R  `RF a. a. a.H	 % $ $ !$" % L  !" %   !0 %   ! % $L $ !$4-  % &l & !& % Q
 Q
 !Q
h % *| * !*& % # # !# % <  !,'N 6??))$/0}$$$K7##$++rA   