← Back
Editing: typing.cpython-312.pyc
� �% g� � �� � d Z ddlmZ ddlmZmZmZ ddlmZ ee e f er ddlmZm Z mZ e Z ed� Z G d� dee � Z G d � d ee � Zy# e $ r ddlmZ Y �@w xY w)z> Type-annotation related support for the referencing library. � )�annotations)� TYPE_CHECKING�Protocol�TypeVar)�Mapping)�Resolved�Resolver�Resource�Dc � � e Zd ZdZdd�Zy)�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 �7/usr/lib/python3.12/site-packages/referencing/typing.py�__call__zRetrieve.__call__! s � � � N)r �URI�returnzResource[D])�__name__� __module__�__qualname__�__doc__r r r r r r s � ��r r c �* � e Zd ZdZedd�� Zdd�Zy)�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 �namezAnchor.name3 s � � r c � � y)z6 Return the resource for this anchor. Nr )r �resolvers r �resolvezAnchor.resolve: s � � r N)r �str)r zResolver[D]r zResolved[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"