/usr/lib/python3/dist-packages/soupsieve/__pycache__
NameSizeModeActions
css_match.cpython-310.pyc365830644editdlrm
css_parser.cpython-310.pyc288270644editdlrm
css_types.cpython-310.pyc126700644editdlrm
pretty.cpython-310.pyc36380644editdlrm
util.cpython-310.pyc32680644editdlrm
__init__.cpython-310.pyc44960644editdlrm
__meta__.cpython-310.pyc59390644editdlrm
Edit: /usr/lib/python3/dist-packages/soupsieve/__pycache__/pretty.cpython-310.pyc (3638B)
o B a²ã@sèdZddlZddlmZe d¡Ze d¡Ze 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¡Zeeeee e e e e eeeeeedœZdedefdd„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 Cs t|ƒ}d}t|ƒd}d}g}||kr‹d}t ¡D]l\}}| ||¡}|r†|} | d¡}| dvrD|d7}| d | d¡d|¡¡n@| dvrQ| | d¡¡n3| d vrb|d8}| | d¡¡n"| d vru| d | d¡d|¡¡n| d vr„| d  | d¡¡¡nq||ksd   |¡S)z%Make the object output string pretty.réN)rrrréz{} {}ú )rrrr rr)r r r )r )rz{} Ú) ÚstrÚlenÚTOKENSÚitemsÚmatchÚendÚappendÚformatÚgroupÚjoin) rÚselÚindexrÚindentÚoutputÚmÚkÚvÚname©r*ú2/usr/lib/python3/dist-packages/soupsieve/pretty.pyÚprettyjs8   ñû r,)Ú__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_DSEPrrr,r*r*r*r+ÚsFC                ñ