U
    ?h                     @  s   d Z ddlmZ ddlmZmZmZ zddlmZ ee	e	f  W n  e
k
r`   ddlmZ Y nX erzddlmZmZmZ e	ZedZG dd dee ZG d	d
 d
ee ZdS )z>
Type-annotation related support for the referencing library.
    )annotations)TYPE_CHECKINGProtocolTypeVar)Mapping)ResolvedResolverResourceDc                   @  s    e Zd ZdZdddddZdS )Retrievez
    A retrieval callable, usable within a `Registry` for resource retrieval.

    Does not make assumptions about where the resource might be coming from.
    URIzResource[D])urireturnc                 C  s   dS )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   D/var/www/html/venv/lib/python3.8/site-packages/referencing/typing.py__call__"   s    zRetrieve.__call__N)__name__
__module____qualname____doc__r   r   r   r   r   r      s   r   c                   @  s2   e Zd ZdZeddddZdddd	d
ZdS )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   dS )z1
        Return the name of this anchor.
        Nr   )r   r   r   r   name4   s    zAnchor.namezResolver[D]zResolved[D])resolverr   c                 C  s   dS )z6
        Return the resource for this anchor.
        Nr   )r   r   r   r   r   resolve;   s    zAnchor.resolveN)r   r   r   r   propertyr   r   r   r   r   r   r   ,   s   r   N)r   
__future__r   typingr   r   r   collections.abcr   r   	TypeErrorZreferencing._corer   r   r	   r   r
   r   r   r   r   r   r   <module>   s   