Mini Shell
a
�DOg0` � @ sZ d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m
Z
g d�ZG dd� dej�Z
G d d
� d
ej�ZG dd� de�ZG d
d� d�ZG dd� dee
e�ZG dd� dee�Zdd� Zdd� ZG dd� de
�ZG dd� de
�ZG dd� de�ZG dd� de�ZG dd � d e
�ZG d!d"� d"�ZG d#d$� d$ee
�ZG d%d&� d&ee�ZG d'd(� d(e
�ZdS ))z4Utilities for with-statement contexts. See PEP 343.� N)�deque��wraps)�
MethodType�GenericAlias)�asynccontextmanager�contextmanager�closing�nullcontext�AbstractContextManager�AbstractAsyncContextManager�AsyncExitStack�ContextDecorator� ExitStack�redirect_stdout�redirect_stderr�suppressc @ s: e Zd ZdZee�Zdd� Zej dd� �Z
edd� �ZdS ) r z,An abstract base class for context managers.c C s | S �z0Return `self` upon entering the runtime context.� ��selfr r �"/usr/lib64/python3.9/contextlib.py� __enter__ s z AbstractContextManager.__enter__c C s dS �z9Raise any exception triggered within the runtime context.Nr �r �exc_type� exc_value� tracebackr r r �__exit__ s zAbstractContextManager.__exit__c C s | t u rt�|dd�S tS )Nr r )r �_collections_abc�_check_methods�NotImplemented��cls�Cr r r �__subclasshook__ s z'AbstractContextManager.__subclasshook__N)�__name__�
__module__�__qualname__�__doc__�classmethodr �__class_getitem__r �abc�abstractmethodr r% r r r r r s
r c @ s: e Zd ZdZee�Zdd� Zej dd� �Z
edd� �ZdS ) r z9An abstract base class for asynchronous context managers.c � s | S r r r r r r �
__aenter__+ s z&AbstractAsyncContextManager.__aenter__c � s dS r r r r r r � __aexit__/ s z%AbstractAsyncContextManager.__aexit__c C s | t u rt�|dd�S tS )Nr. r/ )r r r r! r"