Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
abc.cpython-313.pyc88 linesDownload Raw Back to __pycache__
1�

2��j����SSKrSSKrSSKrSSKrSSKJrJr SSKJrJ	r	J3r4JrJrJ
r
JrJrJrJr \\R&\-r/SQr"SS\R,S9r"SS	\5r\"S5S\
55r"SS
\5rg)�N)�Iterable�Iterator)6�Any�BinaryIO�Literal�NoReturn�Optional�Protocol�Text�TextIO�overload�runtime_checkable)�ResourceReader�Traversable�TraversableResourcesc���\rSrSrSr\RS\S\4Sj5r	\RS\S\4Sj5r7\RS\S\4Sj5r\RS\
\4S	j5rS8rg)r�zDAbstract base class for loaders to provide resource reading support.�resource�returnc��[e)z�Return an opened, file-like object for binary reading.9 10The 'resource' argument is expected to represent only a file name.11If the resource cannot be found, FileNotFoundError is raised.12��FileNotFoundError��selfrs  �]D:\code\apps\devtools\python\user_packages\Python313\site-packages\importlib_resources/abc.py�
open_resource�ResourceReader.open_resources13�� ��c��[e)z�Return the file system path to the specified resource.14 15The 'resource' argument is expected to represent only a file name.16If the resource does not exist on the file system, raise17FileNotFoundError.18rrs  r�
resource_path�ResourceReader.resource_path's19�� �r�pathc��[e)zZReturn True if the named 'path' is a resource.20 21Files are resources, directories are not.22r�rr"s  r�is_resource�ResourceReader.is_resource4s23�� �rc��[e)z+Return an iterable of entries in `package`.r�rs r�contents�ResourceReader.contents<s24�� �r�N)�__name__�25__module__�__qualname__�__firstlineno__�__doc__�abc�abstractmethodrrrr �boolr%r�strr)�__static_attributes__r+rrrrs���N����	 �d�	 �x�	 ��	 �	���26 �d�27 �t�28 ��29 �	��� �� �� �� �	��� �(�3�-� �� rr)�	metaclassc��\rSrSrSrg)�TraversalError�Br+N)r,r-r.r/r5r+rrr8r8Bs��rr8c���\rSrSrSr\RS\S4Sj5rS\	4Sjr30SS\\S\\S\4S	jjr
\RS\4S31j5r\RS\4Sj5rS\SS4S
jrS\SS4Sjr\SS\SS\S\S\4Sjj5r\S\SS\S\S\4Sj5r\RSS\S\S\S\\-4Sjj5r\\RS\4Sj55rSrg)r�Fz�32An object with a subset of pathlib.Path methods suitable for33traversing directories and opening files.34 35Any exceptions that occur when accessing the backing resource36may propagate unaltered.37rc��g)z#38Yield Traversable objects in self39Nr+r(s r�iterdir�Traversable.iterdirP��rc�z�URS5nUR5sSSS5 $!,(df   g=f)z 40Read contents of self as bytes41�rbN��open�read)r�strms  r�42read_bytes�Traversable.read_bytesVs$���Y�Y�t�_���9�9�;��_�_�s�,�43:N�encoding�errorsc�v�URXS9nUR5sSSS5 $!,(df   g=f)z44Read contents of self as text45)rHrINrB)rrHrIrEs    r�	read_text�Traversable.read_text]s)���Y�Y��Y�
8�D��9�9�;�9�
8�
8�s�*�468c��g)z$47Return True if self is a directory48Nr+r(s r�is_dir�Traversable.is_dirfr?rc��g)z49Return True if self is a file50Nr+r(s r�is_file�Traversable.is_filelr?r�descendantsc�Z^�U(dU$[RRS[[R51U555n[
U5mU4SjUR55n[
U5nUR"U6$![a [ST[U55ef=f)z�52Return Traversable resolved with any descendants applied.53 54Each descendant should be a path segment relative to self55and each may contain multiple levels separated by56``posixpath.sep`` (``/``).57c3�8# �UHoRv� M g7f�N)�parts)�.0r"s  r�	<genexpr>�'Traversable.joinpath.<locals>.<genexpr>|s���.58�#J�4�J�J�#J���c3�J># �UHoRT:XdMUv� M g7frV��name)rX�traversable�targets  �rrYrZ�s"����59�+9�K�=M�=M�QW�=W�K�K�>�s�#�	#z"Target not found during traversal.)�	itertools�chain�
from_iterable�map�pathlib�
PurePosixPath�nextr=�
StopIterationr8�list�joinpath)rrS�names�matches�matchr`s     @rrj�Traversable.joinpathrs������K����-�-�.60�#&�w�'<�'<�k�#J�.61�62���e���63�+/�<�<�>�64��	���M�E�65�~�~�u�%�%��	�	� �4�f�d�5�k��
�	�s�/B	�	!B*�childc�$�URU5$)z"66Return Traversable child in self67)rj)rros  r�__truediv__�Traversable.__truediv__�s���}�}�U�#�#r�r�mode�args�kwargsc��grVr+�rrtrurvs    rrC�Traversable.open�s��SVrrAc��grVr+rxs    rrCry�s��PSrc��g)z�68mode may be 'r' or 'rb' to open as text or binary. Return a handle69suitable for reading (same as pathlib.Path.open).70 71When opening as text, accepts encoding parameters such as those72accepted by io.TextIOWrapper.73Nr+rxs    rrCry�r?rc��g)z=74The base name of this object without any parent references.75Nr+r(s rr^�Traversable.name�r?rr+)NN)rs)r,r-r.r/r0r1r2rr=�bytesrFr	r4rKr3rNrQ�StrPathrjrqr
rrrrCr�propertyr^r5r+rrrrFs}���	�����-�0����76�E��GK�� ��
��6>�s�m��	��	��������77	��������78&�W�&��&�2$��$�]�$��V����V�C�V�3�V�6�V��V�
�S����S�s�S�c�S�h�S��S�������3��#��&�8�BS���������c����rrc��\rSrSrSr\RS
Sj5rS\S\	4Sjr79S\S\4Sjr
S\S\4S	jrS\\4S80jrSrg)r�z=81The required interface for providing traversable82resources.83rc��g)z3Return a Traversable object for the loaded package.Nr+r(s r�files�TraversableResources.files�r?rrc�^�UR5RU5RS5$)NrA)r�rjrCrs  rr�"TraversableResources.open_resource�s$���z�z�|�$�$�X�.�3�3�D�9�9rc��[U5erVrrs  rr �"TraversableResources.resource_path�s
����)�)rr"c�\�UR5RU5R5$rV)r�rjrQr$s  rr%� TraversableResources.is_resource�s"���z�z�|�$�$�T�*�2�2�4�4rc�L�SUR5R55$)Nc3�8# �UHoRv� M g7frVr])rX�items  rrY�0TraversableResources.contents.<locals>.<genexpr>�s���=�&<�d�	�	�&<�r[)r�r=r(s rr)�TraversableResources.contents�s��=�d�j�j�l�&:�&:�&<�=�=rr+N)rr)r,r-r.r/r0r1r2r�rrrrrr r3r%rr4r)r5r+rrrr�sl���84	���B��B�:�g�:�(�:�*�c�*�h�*�5��5�D�5�>�(�3�-�>rr)r1ra�osre�collections.abcrr�typingrrrrr	r85rrr
rr4�PathLiker�__all__�ABCMetar�	Exceptionr8rrr+rr�<module>r�s���86��	��.��������C� �87 ��88C��' �s�{�{�' �T	�Y�	��_�(�_��_�D>�>�>r
codekingpro/portable-devtools · Team Ai