7!#\ X d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ dedefdZ d e dedefd Zdededefd Z G d dej ZdedefdZdZedfdedee dedefdZd"dededefdZ G d de j Z d#dddedededee d edefd!ZdS )$ N)Any)Dict)IO)Optionalobjreturnc t | S # t t f$ r t $ r t | j d| dcY S w xY w)Nz("z"))reprKeyboardInterrupt SystemExit BaseExceptiontype__name__)r s f/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/_pytest/_io/saferepr.py_try_repr_or_strr sn 0Cyyz* 0 0 0s))$////////0s 5A A excc t | }n;# t t f$ r t $ r} dt | d}Y d } ~ nd } ~ ww xY wd |t | j t | S )Nzunpresentable exception ()z+<[{} raised in repr()] {} object at 0x{:x}>)r r r r formatr r id)r r exc_infos r _format_repr_exceptionr s H#C((z* H H HG/?/D/DGGGH8??$s))$bgg s A AA smaxsizec t | |k rTt d|dz dz }t d|dz |z }| d | dz | t | |z d z S | S )Nr z...)lenmax)r r ijs r _ellipsizer" sp 1vvGaKA%&&7Q;?##!uu}qQ!..H c f e Zd ZdZddee deddf fd Zdede f fd Z ded ede fdZ xZS ) SafeReprz repr.Repr that limits the resulting size of repr() and includes information on exceptions raised during the call. Fr use_asciir Nc z t ||nd| _ || _ || _ dS )a :param maxsize: If not None, will truncate the resulting repr to that specific size, using ellipsis somewhere in the middle to hide the extra text. If None, will not impose any size limits on the returning repr. Ni ʚ;)super__init__ maxstringr r&