ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/importlib/resources/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/importlib/resources/__pycache__/readers.cpython-311.opt-2.pyc

�

�f�
����ddlZddlZddlZddlZddlmZddlmZd�ZGd�dej	��Z
Gd�d	ej	��ZGd
�dej��Z
Gd�d
ej	��ZdS)�N�)�abc)�unique_everseenc�Z�ttj�|����S�N)�iter�collections�OrderedDict�fromkeys)�itemss �B/opt/alt/python311/lib64/python3.11/importlib/resources/readers.py�remove_duplicatesrs!����'�0�0��7�7�8�8�8�c� �eZdZd�Zd�Zd�ZdS)�
FileReaderc�L�tj|j��j|_dSr)�pathlib�Path�path�parent)�self�loaders  r
�__init__zFileReader.__init__s���L���-�-�4��	�	�	rc�R�	t|j�|����Sr��strr�joinpath�r�resources  r
�
resource_pathzFileReader.resource_path�'��	�
�4�9�%�%�h�/�/�0�0�0rc��|jSr�r�rs r
�fileszFileReader.files�
���y�rN��__name__�
__module__�__qualname__rr r%�rr
rrsA������5�5�5�1�1�1�����rrc�0��eZdZd�Z�fd�Zd�Zd�Z�xZS)�	ZipReaderc��|�d��\}}}|j�dd��|zdz|_|j|_dS)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�names     r
rzZipReader.__init__ sK���&�&�s�+�+�
��1�d��m�+�+�D�#�6�6��=��C����~����rc���	t���|��S#t$r}t|jd���d}~wwxYw�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr�exc�	__class__s   �r
r<zZipReader.open_resource%sS���	1��7�7�(�(��2�2�2���	1�	1�	1�#�C�H�Q�K�0�0�0�����	1���s� $�
A
�A�A
c��|����|��}|���o|���Sr)r%r�is_file�exists)rr�targets   r
�is_resourcezZipReader.is_resource+s<�������&�&�t�,�,���~�~���3�F�M�M�O�O�3rc�@�tj|j|j��Sr)�zipfilerr5r3r$s r
r%zZipReader.files1s���|�D�L�$�+�6�6�6r)r(r)r*rr<rFr%�
__classcell__)rAs@r
r-r-se�������&�&�&�
1�1�1�1�1�4�4�4�7�7�7�7�7�7�7rr-c�`�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	e	Z
d�Zed	���Z
d
�ZdS)�MultiplexedPathc��tttjt	|������|_|jsd}t
|���td�|jD����std���dS)Nz.MultiplexedPath must contain at least one pathc3�>K�|]}|���V��dSr)�is_dir��.0rs  r
�	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Bs*����9�9�T�4�;�;�=�=�9�9�9�9�9�9rz)MultiplexedPath only supports directories)	�list�maprrr�_pathsr>�all�NotADirectoryError)r�paths�messages   r
rzMultiplexedPath.__init__=s����3�w�|�->�u�-E�-E�F�F�G�G����{�	-�F�G�#�G�,�,�,��9�9�T�[�9�9�9�9�9�	R�$�%P�Q�Q�Q�	R�	Rrc�j�d�|jD��}t|tjd�����S)Nc3�HK�|]}|���D]}|V���dSr)�iterdir)rPr�files   r
rQz*MultiplexedPath.iterdir.<locals>.<genexpr>Fs7����I�I�$�$�,�,�.�.�I�I�$��I�I�I�I�I�I�Irr8)�key)rTr�operator�
attrgetter)rr%s  r
r[zMultiplexedPath.iterdirEs5��I�I�$�+�I�I�I���u�(�*=�f�*E�*E�F�F�F�Frc�&�t|�d�����Nz is not a file�r>r$s r
�
read_byteszMultiplexedPath.read_bytesI����4� 7� 7� 7�8�8�8rc�&�t|�d����rarb�rr?�kwargss   r
�	read_textzMultiplexedPath.read_textLrdrc��dS)NTr+r$s r
rNzMultiplexedPath.is_dirOs���trc��dS)NFr+r$s r
rCzMultiplexedPath.is_fileRs���urc�n�|���D]}|j|kr|cS�|jd|zSr:)r[r8rT)r�childr\s   r
rzMultiplexedPath.joinpathUsG���L�L�N�N�	�	�D��y�E�!�!�����"��{�1�~��%�%rc�&�t|�d����rarbrfs   r
�openzMultiplexedPath.open_rdrc�&�|jdjSr:)rTr8r$s r
r8zMultiplexedPath.namebs���{�1�~�"�"rc�V�d�d�|jD����}d|�d�S)Nz, c3�"K�|]
}d|�d�V��dS)�'Nr+rOs  r
rQz+MultiplexedPath.__repr__.<locals>.<genexpr>gs*����>�>�$�+�d�+�+�+�>�>�>�>�>�>rzMultiplexedPath(�))�joinrT)rrWs  r
�__repr__zMultiplexedPath.__repr__fs5���	�	�>�>�$�+�>�>�>�>�>��*�%�*�*�*�*rN)r(r)r*rr[rcrhrNrCr�__truediv__rn�propertyr8rur+rr
rKrK5s��������R�R�R�G�G�G�9�9�9�9�9�9�������&�&�&��K�9�9�9��#�#��X�#�+�+�+�+�+rrKc� �eZdZd�Zd�Zd�ZdS)�NamespaceReaderc�|�dt|��vrtd���tt|���|_dS)N�
NamespacePathzInvalid path)r�
ValueErrorrKrRr)r�namespace_paths  r
rzNamespaceReader.__init__ls;���#�n�"5�"5�5�5��^�,�,�,�#�T�.�%9�%9�:��	�	�	rc�R�	t|j�|����Srrrs  r
r zNamespaceReader.resource_pathqr!rc��|jSrr#r$s r
r%zNamespaceReader.filesyr&rNr'r+rr
ryryksA������;�;�;�
1�1�1�����rry)r	r^rrH�r�
_itertoolsrr�TraversableResourcesrr-�TraversablerKryr+rr
�<module>r�s������������������������'�'�'�'�'�'�9�9�9�
�
�
�
�
��)�
�
�
� 7�7�7�7�7��(�7�7�7�,3+�3+�3+�3+�3+�c�o�3+�3+�3+�l�����c�.�����r

Zerion Mini Shell 1.0