OwlCyberSecurity - MANAGER
Edit File: _compat.cpython-38.pyc
U ʗRe� � @ s` d dl Zd dlmZmZmZmZ G dd� de�Zejj ee d�dd�Z ejj ed�d d �ZdS )� N)�Any�Optional�Protocol�castc @ s4 e Zd ZdZeed�dd��Zed d�dd��ZdS )�BasePatha� A protocol that various path objects conform. This exists because importlib.metadata uses both ``pathlib.Path`` and ``zipfile.Path``, and we need a common base for type hints (Union does not work well since ``zipfile.Path`` is too new for our linter setup). This does not mean to be exhaustive, but only contains things that present in both classes *that we need*. )�returnc C s t � �d S �N��NotImplementedError��self� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/metadata/importlib/_compat.py�name s z BasePath.namec C s t � �d S r r r r r r �parent s zBasePath.parentN)�__name__� __module__�__qualname__�__doc__�property�strr r r r r r r s r )�dr c C s t | dd�S )a� Find the path to the distribution's metadata directory. HACK: This relies on importlib.metadata's private ``_path`` attribute. Not all distributions exist on disk, so importlib.metadata is correct to not expose the attribute as public. But pip's code base is old and not as clean, so we do this to avoid having to rewrite too many things. Hopefully we can eliminate this some day. �_pathN)�getattr)r r r r �get_info_location s r )�distr c C s t t| �jS )z�Get the distribution's project name. The ``name`` attribute is only available in Python 3.10 or later. We are targeting exactly that, but Mypy does not know this. )r r r )r r r r � get_dist_name% s r ) �importlib.metadata� importlib�typingr r r r r �metadata�Distributionr r r r r r r �<module> s