관리-도구
편집 파일: exceptions.cpython-38.pyc
U &?�fc � @ sV d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m Z mZ ddlm Z mZmZmZmZmZmZ ddlmZmZmZ ddlmZ ddlmZ e r�ddlmZ dd lmZm Z dd l!m"Z" ddl#m$Z$ e�%e&�Z'e(e)d�d d�Z*eee(f ee(e(ed�dd�Z+G dd� de,�Z-G dd� de-�Z.G dd� de-�Z/G dd� de-�Z0G dd� de.�Z1G dd� de.�Z2G dd� de-�Z3G d d!� d!e0�Z4G d"d#� d#e0�Z5G d$d%� d%e0�Z6G d&d'� d'e0�Z7G d(d)� d)e-�Z8G d*d+� d+e-�Z9G d,d-� d-e-�Z:G d.d/� d/e-�Z;G d0d1� d1e-�Z<G d2d3� d3e0�Z=G d4d5� d5e0�Z>G d6d7� d7e0�Z?G d8d9� d9e0�Z@G d:d;� d;e0�ZAG d<d=� d=e.e0�ZBG d>d?� d?eBe0�ZCG d@dA� dAe0�ZDG dBdC� dCe0�ZEG dDdE� dEeE�ZFG dFdG� dGeE�ZGG dHdI� dIeE�ZHG dJdK� dKeE�ZIG dLdM� dMeE�ZJG dNdO� dOe0�ZKG dPdQ� dQe/�ZLdRejM� dS�ZNG dTdU� dUe.�ZOG dVdW� dWe.�ZPG dXdY� dYe.�ZQdS )Zz�Exceptions used throughout package. This module MUST NOT try to import from anything within `pip._internal` to operate. This is expected to be importable from any/all files within the subpackage and, thus, should not depend on them. � N)�chain�groupby�repeat)� TYPE_CHECKING�Dict�Iterator�List�Literal�Optional�Union)�Console�ConsoleOptions�RenderResult)�escape)�Text)�_Hash)�Request�Response)�BaseDistribution)�InstallRequirement)�s�returnc C s t �d| �d k S )Nz^[a-z]+(-[a-z]+)*$)�re�match)r � r �F/opt/hc_python/lib/python3.8/site-packages/pip/_internal/exceptions.py�_is_kebab_case$ s r )r �console�prefix�indentr c C sJ t | t�r| }n |�| �}|j|dd�|jd|� �dd��|jdd�� S )N�ignore)�overflow� T)�allow_blank)� isinstancer � render_str�join�split)r r r r �textr r r �_prefix_with_indent( s � �r) c @ s e Zd ZdZdS )�PipErrorzThe base pip error.N��__name__� __module__�__qualname__�__doc__r r r r r* 9 s r* c s� e Zd ZU dZeed<