o
    Ëý°jø  ã                   @   sB   d dl mZmZ d dlmZmZmZ eddd�ZG dd„ dƒZdS )	é    )Ú	ExitStackÚcontextmanager)ÚContextManagerÚIteratorÚTypeVarÚ_TT)Ú	covariantc                       sJ   e Zd Zd
‡ fdd„Zeded fdd„ƒZdee defdd	„Z	‡  Z
S )ÚCommandContextMixInÚreturnNc                    s   t ƒ  ¡  d| _tƒ | _d S )NF)ÚsuperÚ__init__Ú_in_main_contextr   Ú_main_context©Úself©Ú	__class__© ú”/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/pip/_internal/cli/command_context.pyr      s   
zCommandContextMixIn.__init__c                 c   s`   � | j rJ ‚d| _ z"| j� d V  W d   ƒ n1 sw   Y  W d| _ d S W d| _ d S d| _ w )NTF)r   r   r   r   r   r   Úmain_context   s   €
ÿ
ýz CommandContextMixIn.main_contextÚcontext_providerc                 C   s   | j sJ ‚| j |¡S )N)r   r   Úenter_context)r   r   r   r   r   r      s   
z!CommandContextMixIn.enter_context)r
   N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   Ú__classcell__r   r   r   r   r	      s
    
r	   N)	Ú
contextlibr   r   Útypingr   r   r   r   r	   r   r   r   r   Ú<module>   s    