Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/prompt_toolkit/styles/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/prompt_toolkit/styles/__pycache__/pygments.cpython-39.pyc
a

��Sh��@s�dZddlmZddlmZddlmZerDddlmZddl	m
Z
gd�Zdd	d
�dd�Zd
d	d�dd�Z
ddd�dd�ZdS)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_classnameztype[PygmentsStyle]r)�pygments_style_cls�returncCs$ddlm}t||�sJ�t|j�S)a�
    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.
    rr)�pygments.styler�
issubclassr	Zstyles)r�
PygmentsStyle�r�H/usr/local/lib/python3.9/site-packages/prompt_toolkit/styles/pygments.pyrsrzdict[Token, str])�
pygments_dictrcCs0g}|��D]\}}|�t|�|f�qt|�S)z�
    Create a :class:`.Style` instance from a Pygments style dictionary.
    (One that maps Token objects to style strings.)
    )�items�appendr
r)rZpygments_style�token�stylerrrr	1sr	r�str)rrcCsd|}d�|���S)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.)
    )Zpygments�.)�join�lower)r�partsrrrr
>sr
N)�__doc__�
__future__r�typingrrrr
rZpygments.tokenr�__all__rr	r
rrrr�<module>s	

Yohohohohohooho | Sanrei Aya