File: //usr/lib/python3/dist-packages/pygments/formatters/__pycache__/terminal.cpython-38.pyc
U
`a�[7 � 4 @ s d Z ddlZddlmZ ddlmZmZmZmZm Z m
Z
mZmZm
Z
mZ ddlmZ ddlmZ dgZe
ded ed ejd
edejd
ejdejd
ejd
ejdejdejd
ejdejdejdejd
ej dede
dej!dej"d
ej#dej$dej%dej de diZ&G dd� 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_)r r )Zdarkred�red)r r )�brownr )r r )�**r )z*purple*z *fuchsia*)�_red_r c @ sH e Zd ZdZdZddgZg Zdd� Zdd� Zd d
� Z dd� Z
d
d� ZdS )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).
ZTerminalZterminalZconsolec K sP t j| f|� t|dddgd�dk| _|�dd �p4t| _|�dd�| _d| _d S )NZbgZlightZdark�colorscheme�linenosFr ) r �__init__r �darkbg�get�TERMINAL_COLORSr r �_lineno)�selfZoptions� r �>/usr/lib/python3/dist-packages/pygments/formatters/terminal.pyr V s ��zTerminalFormatter.__init__c C sB | j s4t|d�r4t|d�r4|�� r4tjdk r4|j | _ t�| ||�S )N�encoding�isatty)� )r"