File: //var/opt/nydus/ops/referencing/__pycache__/typing.cpython-39.pyc
a
�,�h� � @ s� d Z ddlmZ ddlmZ ddlmZmZmZ zddl m
Z
W n ey^ ddlm
Z
Y n0 erxddlm
Z
mZmZ eZe
ded�ZG d d
� d
ee �ZG dd� dee �Zd
S )z>
Type-annotation related support for the referencing library.
� )�annotations)�Mapping)�
TYPE_CHECKING�Any�Protocol)�TypeVar)�Resolved�Resolver�Resource�D)�defaultc @ s e Zd ZdZddd�dd�ZdS )�Retrievez�
A retrieval callable, usable within a `Registry` for resource retrieval.
Does not make assumptions about where the resource might be coming from.
�URIzResource[D])�uri�returnc C s dS )z�
Retrieve the resource with the given URI.
Raise `referencing.exceptions.NoSuchResource` if you wish to indicate
the retriever cannot lookup the given URI.
N� )�selfr r r �C/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/referencing/typing.py�__call__ s zRetrieve.__call__N)�__name__�
__module__�__qualname__�__doc__r r r r r r
s r
c @ s2 e Zd ZdZedd�dd��Zddd�d d
�ZdS )�Anchorz�
An anchor within a `Resource`.
Beyond "simple" anchors, some specifications like JSON Schema's 2020
version have dynamic anchors.
�str)r c C s dS )z1
Return the name of this anchor.
Nr )r r r r �name2 s zAnchor.namezResolver[D]zResolved[D])�resolverr c C s dS )z6
Return the resource for this anchor.
Nr )r r r r r �resolve9 s zAnchor.resolveN)r r r r �propertyr r r r r r r * s r N)r �
__future__r �collections.abcr �typingr r r Ztyping_extensionsr �ImportErrorZreferencing._corer r r
r r r r
r r r r r �<module> s