HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/soupsieve/__pycache__/pretty.cpython-310.pyc
o

��h��@s�dZddlmZddlZddlmZe�d�Ze�d�Ze�d�Z	e�d�Z
e�d	�Ze�d
�Ze�d�Z
e�d�Ze�d
�Ze�d�Ze�d�Ze�d�Ze�d�Ze�d�Ze�d�Zeee	e
eee
eeeeeeeed�Zddd�ZdS)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*)�class�param�empty�lstrt�dstrt�tstrt�lend�dend�tend�sqstr�sep�dsep�int�kword�dqstr�objr�return�strc
Cs$t|�}d}t|�d}d}g}||kr�d}t��D]n\}}|�||�}|r�|}	|�d�}|	dvrE|d7}|�|�d��dd|���nA|	dvrR|�|�d��n4|	d	vrc|d8}|�|�d��n#|	d
vrw|�|�d��dd|���n|	dvr�|�|�d��d��nq||ksd�|�S)
z%Make the object output string pretty.r�N)rrrr	��
� )rrrr
rr)r
rr)r)r�)	r�len�TOKENS�items�match�end�append�group�join)
r�sel�indexr�indent�output�m�k�v�name�r+�F/usr/local/CyberPanel/lib/python3.10/site-packages/soupsieve/pretty.py�prettyls8
  ��
r-)rrrr)�__doc__�
__future__r�re�typingr�compile�RE_CLASS�RE_PARAM�RE_EMPTY�RE_LSTRT�RE_DSTRT�RE_TSTRT�RE_LEND�RE_DEND�RE_TEND�RE_INT�RE_KWORD�RE_DQSTR�RE_SQSTR�RE_SEP�RE_DSEPrr-r+r+r+r,�<module>sHD














�