Current File : //usr/lib/python3/dist-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc |
�
/�gR\ �
�8 � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m
Z
mZ ddlm
Z
mZmZmZmZmZ ddlmZmZ ddlmZmZmZ ddlmZ ddlmZ e
rdd lmZ dd
lm Z ddl!m"Z" ddl#m$Z$ ejJ e&� Z'd
e(de)fd�Z*d
eee(f dede(de(def
d�Z+ G d� de,� Z- G d� de-� Z. G d� de-� Z/ G d� de-� Z0 G d� de-� Z1 G d� de.� Z2 G d � d!e.� Z3 G d"� d#e-� Z4 G d$� d%e0� Z5 G d&� d'e0� Z6 G d(� d)e0� Z7 G d*� d+e0� Z8 G d,� d-e-� Z9 G d.� d/e-� Z: G d0� d1e-� Z; G d2� d3e-� Z< G d4� d5e-� Z= G d6� d7e0� Z> G d8� d9e0� Z? G d:� d;e0� Z@ G d<� d=e0� ZA G d>� d?e.e0� ZB G d@� dAeBe0� ZC G dB� dCe0� ZD G dD� dEe0� ZE G dF� dGeE� ZF G dH� dIeE� ZG G dJ� dKeE� ZH G dL� dMeE� ZI G dN� dOeE� ZJ G dP� dQe0� ZK G dR� dSe/� ZLdTej� � dU�ZN G dV� dWe.� ZOy)Xz�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�Optional�Union)�Request�Response)�Console�ConsoleOptions�RenderResult)�escape)�Text)�_Hash)�Literal)�BaseDistribution)�InstallRequirement�s�returnc �2 � t j d| � d uS )Nz^[a-z]+(-[a-z]+)*$)�re�match)r s �:/usr/lib/python3/dist-packages/pip/_internal/exceptions.py�_is_kebab_caser $ s � �
�8�8�)�1�-�T�9�9� �console�prefix�indentc �� � t | t � r| }n|j | � }|j |d�� |j d|� �d�� j |j d�� � z S )N�ignore)�overflow�
T)�allow_blank)�
isinstancer �
render_str�join�split)r r r r! �texts r �_prefix_with_indentr, ( ss � � �!�T�����!�!�!�$�����f�x��8�7�;M�;M�
�V�H�
�� <N� <�
�d�4�:�:�$�:�'�(�)� )r c � � e Zd ZdZy)�PipErrorzThe base pip error.N��__name__�
__module__�__qualname__�__doc__� r r r. r. 9 s � �r r. c �� � � e Zd ZU dZeed<