
    ^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     X/home/james-whalen/.local/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A5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88E?  ""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   