
    g                        d Z ddlmZ ddlmZmZmZ 	 ddlmZ ee	e	f    er
ddlmZmZmZ e	Z ed      Z G d dee         Z G d	 d
ee         Zy# e
$ r	 ddlmZ Y @w xY w)z>
Type-annotation related support for the referencing library.
    )annotations)TYPE_CHECKINGProtocolTypeVar)Mapping)ResolvedResolverResourceDc                      e Zd ZdZddZy)Retrievez
    A retrieval callable, usable within a `Registry` for resource retrieval.

    Does not make assumptions about where the resource might be coming from.
    c                     y)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 )selfuris     G/var/www/openai/venv/lib/python3.12/site-packages/referencing/typing.py__call__zRetrieve.__call__"   s     	    N)r   URIreturnzResource[D])__name__
__module____qualname____doc__r   r   r   r   r   r      s    r   r   c                  *    e Zd ZdZedd       ZddZy)Anchorz
    An anchor within a `Resource`.

    Beyond "simple" anchors, some specifications like JSON Schema's 2020
    version have dynamic anchors.
    c                     y)z1
        Return the name of this anchor.
        Nr   )r   s    r   namezAnchor.name4   s    
 	r   c                     y)z6
        Return the resource for this anchor.
        Nr   )r   resolvers     r   resolvezAnchor.resolve;   s     	r   N)r   str)r    zResolver[D]r   zResolved[D])r   r   r   r   propertyr   r!   r   r   r   r   r   ,   s       r   r   N)r   
__future__r   typingr   r   r   collections.abcr   r"   	TypeErrorreferencing._corer   r	   r
   r   r   r   r   r   r   r   <module>r)      sz    # 3 3*2CH
 >> 
 CLx{ "Xa[ ?  *)*s   A A"!A"