Skip to main content
Glama

API Docs MCP Server

pretty.cpython-310.pyc3.74 kB
o �I�g��@s�dZddlmZddlZddlmZe�d�Ze�d�Ze�d�Z e�d�Z e�d �Z e�d �Z e�d �Z e�d �Ze�d �Ze�d�Ze�d�Ze�d�Ze�d�Ze�d�Ze�d�Zeee e e e 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| d vr�|�|�d��d��q�q||ksd �|�S) z%Make the object output string pretty.r�N)rrrr �� � )rrrr rr)r r r )r)r�) r�len�TOKENS�items�match�end�append�group�join) r�sel�indexr�indent�output�m�k�v�name�r+�^C:\Users\apqls\Documents\Github\tkbase\api-docs-mcp\venv\Lib\site-packages\soupsieve/pretty.py�prettyls8     �� r-)rrrr)�__doc__� __future__r�re�typingr�compileZRE_CLASSZRE_PARAMZRE_EMPTYZRE_LSTRTZRE_DSTRTZRE_TSTRTZRE_LENDZRE_DENDZRE_TENDZRE_INTZRE_KWORDZRE_DQSTRZRE_SQSTRZRE_SEPZRE_DSEPrr-r+r+r+r,�<module>sH D                �

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShotaNagafuchi/api-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server