a
    e0h                     @   s\   d dl mZ d dlmZ d dlmZ erHd dlmZmZm	Z	 e	dddZ
G dd	 d	eZd
S )    )contextmanager)	ExitStack)MYPY_CHECK_RUNNING)ContextManagerIteratorTypeVar_TT)	covariantc                       s0   e Zd Z fddZedd Zdd Z  ZS )CommandContextMixInc                    s    t t|   d| _t | _d S )NF)superr
   __init___in_main_contextr   _main_contextself	__class__ O/var/www/auris/lib/python3.9/site-packages/pip/_internal/cli/command_context.pyr      s    zCommandContextMixIn.__init__c                 c   sT   | j r
J d| _ z6| j d V  W d    n1 s40    Y  W d| _ nd| _ 0 d S )NTF)r   r   r   r   r   r   main_context   s    
&z CommandContextMixIn.main_contextc                 C   s   | j s
J | j|S )N)r   r   enter_context)r   context_providerr   r   r   r       s    
z!CommandContextMixIn.enter_context)__name__
__module____qualname__r   r   r   r   __classcell__r   r   r   r   r
      s   
r
   N)
contextlibr   Zpip._vendor.contextlib2r   pip._internal.utils.typingr   typingr   r   r   r   objectr
   r   r   r   r   <module>   s   