a
    [fB                  4   @   s  d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZ ddlmZ ddlmZ dgZedededejd	ed
ejd	e
jdejd	ejdejdejdejd	ejdejdejdejd	ejdede	d
ej dej!dej"dej#dej$dejdediZ%G dd deZ&dS )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)cyanZ
brightcyan)blue
brightblue)magentaZbrightmagenta)greenZbrightgreen)Z_cyan_Z_brightcyan_)Z_green_Z_brightgreen_)r   r   )red	brightred)r   r   )yellowr   )r   r   )**r   )z	*magenta*z*brightmagenta*)_brightred_r   c                   @   sH   e Zd ZdZdZddgZg Zdd Zdd Zd	d
 Z	dd Z
dd ZdS )r   a  
    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).
    ZTerminalZterminalconsolec                 K   sT   t j| fi | t|dddgddk| _|dd p8t| _|dd| _d| _d S )NbglightZdarkcolorschemelinenosFr   )	r   __init__r   darkbggetTERMINAL_COLORSr    r!   _lineno)selfoptions r)   zC:\Users\91910\OneDrive\Desktop\vts_admin_rebuild-master\vts\Lib\site-packages\pip/_vendor/pygments/formatters/terminal.pyr"   S   s    zTerminalFormatter.__init__c                 C   s   t | ||S N)r   format)r'   tokensourceoutfiler)   r)   r*   r,   [   s    zTerminalFormatter.formatc                 C   s4   |  j d7  _ |d| j dkr"dp$d| j f  d S )N   z%s%04d: 
r   )r&   write)r'   r.   r)   r)   r*   _write_lineno^   s    zTerminalFormatter._write_linenoc                 C   s2   | j |}|d u r(|j}| j |}q|| j S r+   )r    r$   parentr#   )r'   ttypecolorsr)   r)   r*   
_get_colorb   s
    zTerminalFormatter._get_colorc              	   C   s   | j r| | |D ]t\}}| |}|dD ]V}|rP|t||d n||d |dr0| j r|| | q0|d q0q| j r|d d S )NTr0   )r!   r2   r6   
splitlinesr1   r   rstripendswith)r'   r-   r.   r4   valuecolorliner)   r)   r*   format_unencodedl   s    


z"TerminalFormatter.format_unencodedN)__name__
__module____qualname____doc__namealiases	filenamesr"   r,   r2   r6   r=   r)   r)   r)   r*   r   8   s   
N)'rA   Zpip._vendor.pygments.formatterr   pip._vendor.pygments.tokenr   r   r   r   r   r   r	   r
   r   r   Z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%   r   r)   r)   r)   r*   <module>   sB   
0!