| Server IP : 217.160.0.135 / Your IP : 216.73.217.25 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/soupsieve/__pycache__/ |
Upload File : |
�
!�Pb� � �2 � d Z ddlZddlmZ ej d� � Z ej d� � Z ej d� � Z ej d� � Z ej d� � Z ej d � � Z
ej d
� � Z ej d� � Z ej d� � Z
ej d
� � Z ej d� � Z ej d� � Z ej d� � Z ej d� � Z ej d� � Zeeeee e
eee
eeeeeed�Zdedefd�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)
```
� N)�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�obj�returnc � � t | � � }d}t |� � dz
}d}g }||k �r�d}t � � � D �]c\ }}|� ||� � }|�rD|} |� d� � }| dv rE|dz
}|� d� |� d� � d|z � � � � n�| dv r)|� |� d� � � � n�| d v r.|dz }|� |� d� � � � n�| d
v r@|� d� |� d� � d|z � � � � n?| dv r;|� d� |� d� � � � � � n��e||k ���d
� |� � S )z%Make the object output string pretty.r � N)r r r r � z{}
{}� )r r r r
r r )r
r r )r )r z{} � )
�str�len�TOKENS�items�match�end�append�format�group�join)
r �sel�indexr �indent�output�m�k�v�names
�2/usr/lib/python3/dist-packages/soupsieve/pretty.py�prettyr- j s� � � �c�(�(�C�
�E�
�c�(�(�Q�,�C�
�F�
�F�
�3�,�,����L�L�N�N� � �D�A�q�����U�#�#�A��
������a�����?�?�?��a�K�F��M�M�(�/�/�!�'�'�!�*�*�c�F�l�"K�"K�L�L�L�L��Q�Q�Q��M�M�!�'�'�!�*�*�-�-�-�-��5�5�5��a�K�F��M�M�!�'�'�!�*�*�-�-�-�-��X�%�%��M�M�(�/�/�!�'�'�!�*�*�c�F�l�"K�"K�L�L�L�L��Y�&�&��M�M�%�,�,�q�w�w�q�z�z�":�":�;�;�;���
� �3�,�,�, �7�7�6�?�?�� )�__doc__�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_DSEPr r r- � r. r, �<module>rC s� ��B� B�F
� � � � � � � � � ��2�:�0�1�1���2�:�-�.�.���2�:�'�(�(���2�:�e�����2�:�e�����2�:�e����
�"�*�U�
�
��
�"�*�U�
�
��
�"�*�U�
�
�� ���F� � ���2�:�,�-�-���2�:�*�+�+���2�:�*�+�+�� ���L� !� !��
�"�*�\�
"�
"�� �
�
�
�
�
����
����
�
�
�
��&�� �� � � � � � r.