Your IP : 18.116.19.29


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

o

6��f�@sxddlZddlZddlZddlmZdd�ZGdd�dej�ZGdd	�d	ej�ZGd
d�dej	�Z
Gdd
�d
ej�ZdS)�N�)�abccCsttj�|��S�N)�iter�collections�OrderedDict�fromkeys)�items�r
�8/opt/alt/python310/lib64/python3.10/importlib/readers.py�remove_duplicates�rc@�$eZdZdd�Zdd�Zdd�ZdS)�
FileReadercCst�|j�j|_dSr)�pathlib�Path�path�parent)�self�loaderr
r
r�__init__szFileReader.__init__cC�	t|j�|��Sr��strr�joinpath�r�resourcer
r
r�
resource_path�zFileReader.resource_pathcC�|jSr�r�rr
r
r�files�zFileReader.filesN��__name__�
__module__�__qualname__rrr"r
r
r
rrsrcs4eZdZdd�Z�fdd�Zdd�Zdd�Z�ZS)	�	ZipReadercCs4|�d�\}}}|j�dd�|d|_|j|_dS)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�namer
r
rrszZipReader.__init__c
s6zt��|�WSty}zt|jd��d}~ww�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr�exc��	__class__r
rr5!s��zZipReader.open_resourcecCs|���|�}|��o|��Sr)r"r�is_file�exists)rr�targetr
r
r�is_resource'szZipReader.is_resourcecCst�|j|j�Sr)�zipfilerr/r-r!r
r
rr"-r
zZipReader.files)r%r&r'rr5r?r"�
__classcell__r
r
r:rr(s
r(c@sfeZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e	Z
dd�Zedd��Z
dd�ZdS)�MultiplexedPathcGsHtttjt|���|_|jsd}t|��tdd�|jD��s"td��dS)Nz.MultiplexedPath must contain at least one pathcss�|]}|��VqdSr)�is_dir��.0rr
r
r�	<genexpr>>s�z+MultiplexedPath.__init__.<locals>.<genexpr>z)MultiplexedPath only supports directories)	�list�maprrr�_pathsr7�all�NotADirectoryError)r�paths�messager
r
rr9s�zMultiplexedPath.__init__ccsB�g}|jD]}|��D]}|j|vrq|�|j�|VqqdSr)rI�iterdirr2�append)rZvisitedr�filer
r
rrNAs�

��zMultiplexedPath.iterdircC�t|�d����Nz is not a file�r7r!r
r
r�
read_bytesJ�zMultiplexedPath.read_bytescOrQrRrS�rr8�kwargsr
r
r�	read_textMrUzMultiplexedPath.read_textcC�dS)NTr
r!r
r
rrCP�zMultiplexedPath.is_dircCrY)NFr
r!r
r
rr<SrZzMultiplexedPath.is_filecCs.|��D]}|j|kr|Sq|jd|Sr3)rNr2rI)r�childrPr
r
rrVs

�zMultiplexedPath.joinpathcOrQrRrSrVr
r
r�open`rUzMultiplexedPath.opencCs|jdjSr3)rIr2r!r
r
rr2cszMultiplexedPath.namecCs"d�dd�|jD��}d|�d�S)Nz, css�|]	}d|�d�VqdS)�'Nr
rDr
r
rrFhs�z+MultiplexedPath.__repr__.<locals>.<genexpr>zMultiplexedPath(�))�joinrI)rrLr
r
r�__repr__gszMultiplexedPath.__repr__N)r%r&r'rrNrTrXrCr<r�__truediv__r\�propertyr2r`r
r
r
rrB1s	
rBc@r)�NamespaceReadercCs&dt|�vr
td��tt|��|_dS)NZ
NamespacePathzInvalid path)r�
ValueErrorrBrGr)r�namespace_pathr
r
rrmszNamespaceReader.__init__cCrrrrr
r
rrrrzNamespaceReader.resource_pathcCrrr r!r
r
rr"zr#zNamespaceReader.filesNr$r
r
r
rrclsrc)rr@r�rrZTraversableResourcesrr(ZTraversablerBrcr
r
r
r�<module>s;

?>