Files
ServerSync/lib/prompt_toolkit/styles/__pycache__/pygments.cpython-314.pyc

41 lines
2.8 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i<EFBFBD><00><01><><00>Rt^RIHt^RIHt^RIHt]'d ^RIHt^RI H
t
.R Ot RRlt RRlt R R
ltR #) z<>
Adaptor for building prompt_toolkit styles, starting from a Pygments style.
Usage::
from pygments.styles.tango import TangoStyle
style = style_from_pygments_cls(pygments_style_cls=TangoStyle)
)<01> annotations)<01> TYPE_CHECKING<4E><01>Style)<01>Tokenc<01> <00>V^8<>dQhRRRR/#)<05><00>pygments_style_clsztype[PygmentsStyle]<5D>returnr<00>)<01>formats"<22>E/tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/styles/pygments.py<70> __annotate__rs<00><00>?<3F>?<3F>0C<30>?<3F><05>?<3F>c<05>^<00>^RIHp\W4'gQh\VP4#)ao
Shortcut to create a :class:`.Style` instance from a Pygments style class
and a style dictionary.
Example::
from prompt_toolkit.styles.from_pygments import style_from_pygments_cls
from pygments.styles import get_style_by_name
style = style_from_pygments_cls(get_style_by_name('monokai'))
:param pygments_style_cls: Pygments style class to start from.
r)<05>pygments.styler<00>
issubclass<EFBFBD>style_from_pygments_dict<63>styles)r <00> PygmentsStyles& r <00>style_from_pygments_clsrs+<00><00>6<> <15>(<28> 8<> 8<>8<> 8<> #<23>$6<>$=<3D>$=<3D> ><3E>>rc<01> <00>V^8<>dQhRRRR/#)r<00> pygments_dictzdict[Token, str]r
rr )r s"r rr1s<00><00>
!<21>
!<21>,<<3C>
!<21><15>
!rc<05><><00>.pVP4F!wr#VP\V4V34K# \V4#)zu
Create a :class:`.Style` instance from a Pygments style dictionary.
(One that maps Token objects to style strings.)
)<04>items<6D>append<6E>pygments_token_to_classnamer)r<00>pygments_style<6C>token<65>styles& r rr1sD<00><00>
<18>N<EFBFBD>%<25>+<2B>+<2B>-<2D> <0C><05><16><1D><1D>:<3A>5<EFBFBD>A<>5<EFBFBD>I<>J<>.<2E> <11><1E> <20> rc<01> <00>V^8<>dQhRRRR/#)rrrr
<00>strr )r s"r rr>s<00><00>#<23>#<23>u<EFBFBD>#<23><13>#rc<05>R<00>RV,pRPV4P4#)z<>
Turn e.g. `Token.Name.Exception` into `'pygments.name.exception'`.
(Our Pygments lexer will also turn the tokens that pygments produces in a
prompt_toolkit list of fragments that match these styling rules.)
<EFBFBD>.)<01>pygments)<02>join<69>lower)r<00>partss& r rr>s%<00><00> <1A>E<EFBFBD> !<21>E<EFBFBD> <0E>8<EFBFBD>8<EFBFBD>E<EFBFBD>?<3F> <20> <20> "<22>"rN)rrr)<0F>__doc__<5F>
__future__r<00>typingrrrrr<00>pygments.tokenr<00>__all__rrrr rr <00><module>r-s4<00><01><04>#<23> <20><18><10>5<>$<24> <02><07>?<3F>*
!<21>#r