HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-310.pyc
o

@%NeB�@s*dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZdgZied�e
d�ed�ejd	�ed
�ejd	�e
jd�ejd	�ejd�ejd
�ejd�ejd	�ejd�ejd�ejd�ejd	�ejd�ede	d
ej dej!dej"dej#dej$dejdedi	�Z%Gdd�de�Z&dS)z�
    pygments.formatters.terminal
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for terminal output with ANSI sequences.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)
�Keyword�Name�Comment�String�Error�Number�Operator�Generic�Token�
Whitespace)�
ansiformat)�get_choice_opt�TerminalFormatter)�r)�gray�brightblack)�cyan�
brightcyan)�blue�
brightblue)�magenta�
brightmagenta)�green�brightgreen)�_cyan_�_brightcyan_)�_green_�
_brightgreen_)rr)�red�	brightred)rr)�yellowr!)r r )�**r")z	*magenta*z*brightmagenta*)�_brightred_r#c@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).
    �Terminal�terminal�consolecKsTtj|fi|��t|dddgd�dk|_|�dd�pt|_|�dd�|_d|_dS)N�bg�light�dark�colorscheme�linenosFr)	r�__init__r�darkbg�get�TERMINAL_COLORSr*r+�_lineno)�self�options�r3�J/usr/lib/python3/dist-packages/pip/_vendor/pygments/formatters/terminal.pyr,Ss��
zTerminalFormatter.__init__cCst�|||�S�N)r�format)r1�tokensource�outfiler3r3r4r6[szTerminalFormatter.formatcCs4|jd7_|�d|jdkrdpd|jf�dS)N�z%s%04d: �
r)r0�write)r1r8r3r3r4�
_write_lineno^s&zTerminalFormatter._write_linenocCs8|j�|�}|dur|j}|j�|�}|dus
||jSr5)r*r.�parentr-)r1�ttype�colorsr3r3r4�
_get_colorbs�
zTerminalFormatter._get_colorc	Cs�|jr|�|�|D]:\}}|�|�}|�d�D]+}|r(|�t||�d���n|�|�d��|�d�rC|jr>|�|�q|�d�qq
|jrO|�d�dSdS)NTr:)r+r<r@�
splitlinesr;r
�rstrip�endswith)r1r7r8r>�value�color�liner3r3r4�format_unencodedls"



���z"TerminalFormatter.format_unencodedN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr,r6r<r@rGr3r3r3r4r8s
N)'rK�pip._vendor.pygments.formatterr�pip._vendor.pygments.tokenrrrrrrr	r
rr�pip._vendor.pygments.consoler
�pip._vendor.pygments.utilr�__all__�Preproc�Type�Word�Builtin�Function�	Namespace�Class�	Exception�	Decorator�Variable�Constant�	Attribute�Tag�Deleted�Inserted�Heading�
Subheading�Promptr/rr3r3r3r4�<module>sh
0�������	�
���
�������!