관리-도구
편집 파일: other.cpython-38.pyc
U ʗRe� � @ sz d Z ddlmZ ddlmZ ddlmZ ddlmZ dddgZ G d d� de�Z G d d� de�ZdZdZ G d d� de�ZdS )z� pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� Formatter)�get_choice_opt)�Token)�colorize� NullFormatter�RawTokenFormatter�TestcaseFormatterc @ s* e Zd ZdZdZddgZdgZdd� ZdS ) r z; Output the text unchanged without any formatting. z Text only�text�nullz*.txtc C s8 | j }|D ](\}}|r(|�|�|�� q |�|� q d S �N)�encoding�write�encode)�self�tokensource�outfile�enc�ttype�value� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/pygments/formatters/other.py�format s zNullFormatter.formatN)�__name__� __module__�__qualname__�__doc__�name�aliases� filenamesr r r r r r s c @ s6 e Zd ZdZdZddgZdgZdZdd� Zd d � Z dS )r a} Format tokens as a raw representation for storing token streams. The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later be converted to a token stream with the `RawTokenLexer`, described in the :doc:`lexer list <lexers>`. Only two options are accepted: `compress` If set to ``'gz'`` or ``'bz2'``, compress the output with the given compression algorithm after encoding (default: ``''``). `error_color` If set to a color name, highlight error tokens using that color. If set but with no value, defaults to ``'red'``. .. versionadded:: 0.11 z Raw tokens�raw�tokensz*.rawFc K s� t j| f|� d| _t|dddddgd�| _|�dd �| _| jdkrJd | _| jd k r�zt| jd� W n" tk r� t d | j ��Y nX d S )N�ascii�compress� �none�gz�bz2�error_colorT�redzInvalid color %r specified) r �__init__r r r"