U
    kuf—  ã                   @  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   ú6/tmp/pip-unpacked-wheel-g5oy8ly_/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   