HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pygments/formatters/__pycache__/terminal.cpython-38.pyc
U

`a�[7�4@sdZddlZddlmZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZddlmZddlmZdgZe
ded	ed	ejd
edejd
ejdejd
ejd
ejdejdejd
ejdejdejdejd
ej dede
dej!dej"d
ej#dej$dej%dej	de	diZ&Gdd�de�Z'dS)z�
    pygments.formatters.terminal
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for terminal output with ANSI sequences.

    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	Formatter)
�Keyword�Name�Comment�String�Error�Number�Operator�Generic�Token�
Whitespace)�
ansiformat)�get_choice_opt�TerminalFormatter)�r)�	lightgray�darkgray)ZtealZ	turquoise)Zdarkblue�blue)ZpurpleZfuchsia)Z	darkgreenZgreen)Z_teal_Z_turquoise_)Z_darkgreen_Z_green_)rr)Zdarkred�red)rr)�brownr)rr)�**r)z*purple*z	*fuchsia*)�_red_rc@sHeZdZdZdZddgZgZdd�Zdd�Zd	d
�Z	dd�Z
d
d�ZdS)ra�
    Format tokens with ANSI color sequences, for output in a text console.
    Color sequences are terminated at newlines, so that paging the output
    works correctly.

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers on the terminal output as well
        (default: ``False`` = no line numbers).
    ZTerminalZterminalZconsolecKsPtj|f|�t|dddgd�dk|_|�dd�p4t|_|�dd�|_d|_dS)NZbgZlightZdark�colorscheme�linenosFr)	r�__init__r�darkbg�get�TERMINAL_COLORSrr�_lineno)�selfZoptions�r �>/usr/lib/python3/dist-packages/pygments/formatters/terminal.pyrVs��zTerminalFormatter.__init__cCsB|js4t|d�r4t|d�r4|��r4tjdkr4|j|_t�|||�S)N�encoding�isatty)�)r"�hasattrr#�sys�version_infor�format)r�tokensource�outfiler r r!r(^s���zTerminalFormatter.formatcCs4|jd7_|�d|jdkr"dp$d|jf�dS)N�z%s%04d: �
r)r�write)rr*r r r!�
_write_linenogszTerminalFormatter._write_linenocCs2|j�|�}|dkr(|j}|j�|�}q||jS)N)rr�parentr)r�ttypeZcolorsr r r!�
_get_colorks
zTerminalFormatter._get_colorc	Cs�|jr|�|�|D]t\}}|�|�}|�d�D]V}|rP|�t||�d���n|�|�d��|�d�r0|jr||�|�q0|�d�q0q|jr�|�d�dS)NTr,)rr.r1�
splitlinesr-r
�rstrip�endswith)rr)r*r0�valueZcolor�liner r r!�format_unencodedus


z"TerminalFormatter.format_unencodedN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrr(r.r1r7r r r r!r;s	
)(r;r&Zpygments.formatterrZpygments.tokenrrrrrrr	r
rrZpygments.consoler
Z
pygments.utilr�__all__ZPreprocZTypeZWordZBuiltinZFunctionZ	NamespaceZClass�	ExceptionZ	DecoratorZVariableZConstantZ	AttributeZTagZDeletedZInsertedZHeadingZ
SubheadingZPromptrrr r r r!�<module>sx
0�!