ó
    OÎh¶  ã                  óx   • S r SSKJr  SSKJr  SSKJr  \(       a  SSKJr  SSK	J
r
  / SQrSS jrSS	 jrSS
 jrg)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)
é    )Úannotations)ÚTYPE_CHECKINGé   ©ÚStyle)ÚToken)Ústyle_from_pygments_clsÚstyle_from_pygments_dictÚpygments_token_to_classnamec                ó\   • SSK Jn  [        X5      (       d   e[        U R                  5      $ )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   r   )Úpygments.styler   Ú
issubclassr
   Ústyles)Úpygments_style_clsÚPygmentsStyles     Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/prompt_toolkit/styles/pygments.pyr	   r	      s+   € õ 6äÐ(×8Ñ8Ð8Ð8ä#Ð$6×$=Ñ$=Ó>Ð>ó    c                ó†   • / nU R                  5        H!  u  p#UR                  [        U5      U45        M#     [        U5      $ )zu
Create a :class:`.Style` instance from a Pygments style dictionary.
(One that maps Token objects to style strings.)
)ÚitemsÚappendr   r   )Úpygments_dictÚpygments_styleÚtokenÚstyles       r   r
   r
   1   sD   € ð
 €Nà%×+Ñ+Ö-‰ˆØ×ÑÔ:¸5ÓAÀ5ÐIÖJñ .ô �Ó Ð r   c                óJ   • SU -   nSR                  U5      R                  5       $ )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.)
)ÚpygmentsÚ.)ÚjoinÚlower)r   Úpartss     r   r   r   >   s%   € ð ˜EÑ!€EØ�8‰8�E‹?× Ñ Ó"Ð"r   N)r   ztype[PygmentsStyle]Úreturnr   )r   zdict[Token, str]r!   r   )r   r   r!   Ústr)Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   Úpygments.tokenr   Ú__all__r	   r
   r   © r   r   Ú<module>r)      s4   ðñõ #å  å æÝ5Ý$ò€ô?ô*
!õ#r   