관리-도구
편집 파일: irc.cpython-38.pyc
U ʗRe� � 2 @ s& d Z ddlmZ ddlmZmZmZmZmZm Z m Z mZmZm Z ddlmZ dgZede dedejded ejde jd ejdejdejdejd ejdejdejdejdejdejdede d ejdejdej dej!dejdediZ"dddddddddddddd d d!d"d#d$d%�Z#d&d'� Z$G d(d� de�Z%d)S )*z� pygments.formatters.irc ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for IRC output :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� Formatter) �Keyword�Name�Comment�String�Error�Number�Operator�Generic�Token� Whitespace)�get_choice_opt�IRCFormatter)� r )�gray�brightblack)�cyan� brightcyan)�blue� brightblue)�magentar )�green�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 � � � � � � � � � � � � � � � )�white�blackr r r r r Zoranger ZbrightyellowZ lightgreenr r Z lightbluer r Z brightmagentar r c C s� t | �dk r|S d }}d| kr:|d7 }d| }| �d�} d| kr\|d7 }d| }| �d�} t | �dkr�|dtt| ��d � 7 }d| }|| | S ) Nr r �_��*�r �r �<�>z</)�len�strip�str� IRC_COLOR_MAP�zfill)�color�text�add�sub� 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/irc.py� ircformatL s rA c @ s@ e Zd ZdZdZddgZg Zdd� Zdd� Zdd � Z d d� Z dS ) r aS Format tokens with IRC color sequences 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 in the output as well (default: ``False`` = no line numbers). ZIRC�ircc K sP t j| f|� t|dddgd�dk| _|�dd �p4t| _|�dd�| _d| _d S )N�bgZlightZdark�colorscheme�linenosFr ) r �__init__r �darkbg�get� IRC_COLORSrD rE �_lineno)�self�optionsr? r? r@ rF z s ��zIRCFormatter.__init__c C s"