Your IP : 18.117.91.170


Current Path : /opt/alt/python310/lib64/python3.10/importlib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/importlib/__pycache__/_adapters.cpython-310.opt-1.pyc

o

6��ft�@sNddlmZddlmZGdd�d�ZGdd�d�ZGdd	�d	�Zd
d�ZdS)
�)�suppress�)�abcc@s(eZdZdZdd�fdd�Zdd�ZdS)	�SpecLoaderAdapterz>
    Adapt a package spec to adapt the underlying loader.
    cCs|jS�N)�loader��spec�r
�:/opt/alt/python310/lib64/python3.10/importlib/_adapters.py�<lambda>szSpecLoaderAdapter.<lambda>cCs||_||�|_dSr)r	r)�selfr	Zadapterr
r
r�__init__szSpecLoaderAdapter.__init__cC�t|j|�Sr)�getattrr	�r
�namer
r
r�__getattr__�zSpecLoaderAdapter.__getattr__N)�__name__�
__module__�__qualname__�__doc__rrr
r
r
rrsrc@s eZdZdZdd�Zdd�ZdS)�TraversableResourcesLoaderz9
    Adapt a loader to provide TraversableResources.
    cC�
||_dSrr�r
r	r
r
rr�
z#TraversableResourcesLoader.__init__cCst|j���Sr)�DegenerateFilesr	�_nativerr
r
r�get_resource_readersz.TraversableResourcesLoader.get_resource_readerN)rrrrrrr
r
r
rrsrc@sNeZdZdZGdd�dej�Zdd�Zedd��Z	dd	�Z
d
d�Zdd
�ZdS)rzg
    Adapter for an existing or non-existant resource reader
    to provide a degenerate .files().
    c@sBeZdZdd�Zdd�ZeZZdd�Zedd��Z	d
d
d�Z
dS)zDegenerateFiles.PathcCstd�S)Nr
)�iter�r
r
r
r�iterdir&�zDegenerateFiles.Path.iterdircC�dS)NFr
r!r
r
r�is_dir)szDegenerateFiles.Path.is_dircC�t��Sr�r�Path)r
�otherr
r
r�joinpath.r#zDegenerateFiles.Path.joinpathcCr$)N�r
r!r
r
rr1szDegenerateFiles.Path.name�rbcOst��r)�
ValueError)r
�mode�args�kwargsr
r
r�open5szDegenerateFiles.Path.openN)r,)rrrr"r%�is_file�existsr*�propertyrr1r
r
r
rr(%s
r(cCrrrrr
r
rr8rzDegenerateFiles.__init__cCs>tt��|jj�|jj�Wd�S1swYdSr)r�AttributeErrorr	rrrr!r
r
r�_reader;s
$�zDegenerateFiles._readercCs|j}t|d�r
|S|S)zB
        Return the native reader if it supports files().
        �files)r6�hasattr)r
�readerr
r
rr@szDegenerateFiles._nativecCrr)rr6)r
�attrr
r
rrGrzDegenerateFiles.__getattr__cCr&rr'r!r
r
rr7Jr#zDegenerateFiles.filesN)
rrrrrZTraversabler(rr4r6rrr7r
r
r
rrs
rcCst|jt�S)z`
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    )r�__spec__r)�packager
r
r�	wrap_specNsr=N)�
contextlibrr+rrrrr=r
r
r
r�<module>s
/

?>