Your IP : 3.145.97.1


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

�

c��f3���	ddlZddlZddlZddlmZmZddlmZmZGd�dej��Z	Gd�de��Z
Gd	�d
e��ZGd�dee	��ZdS)
�N)�BinaryIO�List�)�Traversable�TraversableResourcesc��eZdZ	ejd���Zejd���Zejd���Zejd���Z	e
d���ZdS)�SimpleReaderc��dS�N���selfs �A/opt/alt/python311/lib64/python3.11/importlib/resources/simple.py�packagezSimpleReader.package���	�	�c��dSrrr
s r�childrenzSimpleReader.childrens��	�	rc��dSrrr
s r�	resourceszSimpleReader.resources"rrc��dSrr)r�resources  r�open_binaryzSimpleReader.open_binary)rrc�B�|j�d��dS)N�.���)r�splitr
s r�namezSimpleReader.name0s���|�!�!�#�&�&�r�*�*rN)�__name__�
__module__�__qualname__�abc�abstractpropertyr�abstractmethodrrr�propertyrrrrr	r	
s��������
	�������	�������	�������	��������+�+��X�+�+�+rr	c�0�eZdZ	d�Zd�Zd�Zdd�Zd�ZdS)	�ResourceHandlec�"�||_||_dSr)�parentr)rr)rs   r�__init__zResourceHandle.__init__:s�������	�	�	rc��dS�NTrr
s r�is_filezResourceHandle.is_file?����trc��dS�NFrr
s r�is_dirzResourceHandle.is_dirB����ur�rc��|jj�|j��}d|vrt	j|g|�Ri|��}|S)N�b)r)�readerrr�io�
TextIOWrapper)r�mode�args�kwargs�streams     r�openzResourceHandle.openEsJ����#�/�/��	�:�:���d�?�?��%�f�>�t�>�>�>�v�>�>�F��
rc� �td���)NzCannot traverse into a resource)�RuntimeError)rrs  r�joinpathzResourceHandle.joinpathKs���<�=�=�=rN)r3)rr r!r*r-r1r=r@rrrr'r'5si����������
����������>�>�>�>�>rr'c�J�eZdZ	d�Zd�Zd�Zd�Zd�Zed���Z	d�Z
dS)	�ResourceContainerc��||_dSr)r6)rr6s  rr*zResourceContainer.__init__Ts
������rc��dSr,rr
s rr1zResourceContainer.is_dirXr.rc��dSr0rr
s rr-zResourceContainer.is_file[r2rc����fd��jjD��}tt�j�����}tj||��S)Nc3�8�K�|]}t�|��V��dSr)r')�.0rrs  �r�	<genexpr>z,ResourceContainer.iterdir.<locals>.<genexpr>_s-�����N�N����d�+�+�N�N�N�N�N�Nr)r6r�maprBr�	itertools�chain)r�files�dirss`  r�iterdirzResourceContainer.iterdir^sQ���N�N�N�N���8M�N�N�N���$�d�k�&:�&:�&<�&<�=�=����u�d�+�+�+rc��t���r)�IsADirectoryError)rr:r;s   rr=zResourceContainer.opencs���!�!�!rc#�JK�|D]}|�d��Ed{V���dS)N�/)r)�compound_namesrs  r�_flattenzResourceContainer._flattenfsD����"�	'�	'�D��z�z�#���&�&�&�&�&�&�&�&�	'�	'rc���|s|S|�|��}t|���t�fd�|���D����j|�S)Nc3�2�K�|]}|j�k�
|V��dSr)r)rH�traversable�targets  �rrIz-ResourceContainer.joinpath.<locals>.<genexpr>ps:�����
�
�'�[�=M�QW�=W�=W�K�=W�=W�=W�=W�
�
r)rU�nextrOr@)r�descendants�namesrYs   @rr@zResourceContainer.joinpathksz����	��K��
�
�k�*�*���e�����t�
�
�
�
�+/�<�<�>�>�
�
�
�
�
�
�E��	rN)rr r!r*r1r-rOr=�staticmethodrUr@rrrrBrBOs�����������������,�,�,�
"�"�"��'�'��\�'�����rrBc��eZdZ	d�ZdS)�TraversableReaderc� �t|��Sr)rBr
s rrMzTraversableReader.files|s�� ��&�&�&rN)rr r!rMrrrr_r_us(�������'�'�'�'�'rr_)
r"r7rK�typingrrrr�ABCr	r'rBr_rrr�<module>rcs����
�
�
�	�	�	�	�����!�!�!�!�!�!�!�!�2�2�2�2�2�2�2�2�%+�%+�%+�%+�%+�3�7�%+�%+�%+�P>�>�>�>�>�[�>�>�>�4#�#�#�#�#��#�#�#�L'�'�'�'�'�,�l�'�'�'�'�'r

?>