Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/setuptools/_vendor/importlib_resources/__pycache__/abc.cpython-37.pyc
Назад
B �5�g � @ s� d dl Z d dlZd dlZd dlZd dlmZmZmZmZm Z m Z mZ ddlm Z mZmZ dddgZG dd� de jd �ZG d d� de�Ze G dd� de��ZG d d� de�ZdS )� N)�Any�BinaryIO�Iterable�Iterator�NoReturn�Text�Optional� )�runtime_checkable�Protocol�StrPath�ResourceReader�Traversable�TraversableResourcesc @ sj e Zd ZdZejeed�dd��Zejeed�dd��Z ejee d�dd ��Zejee d �dd��Zd S )r zDAbstract base class for loaders to provide resource reading support.)�resource�returnc C s t �dS )z�Return an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised. N)�FileNotFoundError)�selfr � r �R/tmp/pip-install-251nq386/setuptools/setuptools/_vendor/importlib_resources/abc.py� open_resource s zResourceReader.open_resourcec C s t �dS )z�Return the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError. N)r )r r r r r � resource_path s zResourceReader.resource_path)�pathr c C s t �dS )zjReturn True if the named 'path' is a resource. Files are resources, directories are not. N)r )r r r r r �is_resource) s zResourceReader.is_resource)r c C s t �dS )z+Return an iterable of entries in `package`.N)r )r r r r �contents1 s zResourceReader.contentsN)�__name__� __module__�__qualname__�__doc__�abc�abstractmethodr r r r �boolr r �strr r r r r r s )� metaclassc @ s e Zd ZdS )�TraversalErrorN)r r r r r r r r$ 7 s r$ c @ s� e Zd ZdZejed d�dd��Zed�dd�Z de e ed�d d �Zeje d�dd��Zeje d�d d��Zed d�dd�Zed d�dd�Zejddd��Zeejed�dd���ZdS )r z� An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. Any exceptions that occur when accessing the backing resource may propagate unaltered. )r c C s dS )z3 Yield Traversable objects in self Nr )r r r r �iterdirE s zTraversable.iterdirc C s | � d�� }|�� S Q R X dS )z0 Read contents of self as bytes �rbN)�open�read)r �strmr r r � read_bytesK s zTraversable.read_bytesN)�encodingr c C s | j |d�� }|�� S Q R X dS )z/ Read contents of self as text )r+ N)r'