~fpdZddlmZddlZddlmZej dZej dZej dZ ej dZ ej d Z ej d Z ej d Z ej d Zej d Zej dZej dZej dZej dZej dZej dZeee e e e e eeeeeeeedZddZy)a Format a pretty string of a `SoupSieve` object for easy debugging. This won't necessarily support all types and such, and definitely not support custom outputs. It is mainly geared towards our types as the `SelectorList` object is a beast to look at without some indentation and newlines. The format and various output types is fairly known (though it hasn't been tested extensively to make sure we aren't missing corners). Example: ------- ``` >>> import soupsieve as sv >>> sv.compile('this > that.class[name=value]').selectors.pretty() SelectorList( selectors=( Selector( tag=SelectorTag( name='that', prefix=None), ids=(), classes=( 'class', ), attributes=( SelectorAttribute( attribute='name', prefix='', pattern=re.compile( '^value$'), xml_type_pattern=None), ), nth=(), selectors=(), relation=SelectorList( selectors=( Selector( tag=SelectorTag( name='this', prefix=None), ids=(), classes=(), attributes=(), nth=(), selectors=(), relation=SelectorList( selectors=(), is_not=False, is_html=False), rel_type='>', contains=(), lang=(), flags=0), ), is_not=False, is_html=False), rel_type=None, contains=(), lang=(), flags=0), ), is_not=False, is_html=False) ``` ) annotationsN)Anyz(?i)[a-z_][_a-z\d\.]+\(z(?i)[_a-z][_a-z\d]+=z\(\)|\[\]|\{\}z\[z\{z\(z\]z\}z\)z\d+z(?i)[_a-z][_a-z\d]+z"(?:\\.|[^"\\])*"z'(?:\\.|[^'\\])*'z \s*(,)\s*z \s*(:)\s*)classparamemptylstrtdstrttstrtlenddendtendsqstrsepdsepintkworddqstrct|}d}t|dz }d}g}||kr$d}tjD]\}}|j ||}|s|} |j d}| dvr.|dz }|j |jddd|zn| dvr!|j |jdn~| d vr&|dz}|j |jdnT| d vr)|j |jddd|zn'| d vr#|j |jddn||kr$d j|S) z%Make the object output string pretty.rN)rrr r   )rrrrrr)r r r )r)r) strlenTOKENSitemsmatchendappendgroupjoin) objselindexrindentoutputmkvnames Y/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/soupsieve/pretty.pyprettyr-lsP c(C E c(Q,C F F 3, LLNDAqU#Aa??aKFMMQWWQZL3<."ABQQMM!''!*-55aKFMM!''!*-X%MMQWWQZL3<."ABY&MMQWWQZL"23%# 3,, 776?)r#rreturnr)__doc__ __future__rretypingrcompileRE_CLASSRE_PARAMRE_EMPTYRE_LSTRTRE_DSTRTRE_TSTRTRE_LENDRE_DENDRE_TENDRE_INTRE_KWORDRE_DQSTRRE_SQSTRRE_SEPRE_DSEPrr-r.r,rEsHCH#  2::0 1 2::- . 2::' ( 2::e  2::e  2::e  "**U  "**U  "**U  F  2::, - 2::* + 2::* + L ! "**\ "               &r.