HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/referencing/__pycache__/exceptions.cpython-39.pyc
a

�,�hP�@s�dZddlmZddlmZmZddlZddlmZerPddl	m
Z
ddlmZeGdd	�d	e
��ZeGd
d�de��ZeGdd
�d
e
��ZeGdd�de��ZejGdd�de��ZeGdd�de��ZeGdd�de��ZeGdd�de��ZdS)z
Errors, oh no!
�)�annotations)�
TYPE_CHECKING�AnyN)�frozen)�Resource)�URIc@s8eZdZUdZded<ddd�dd�Zd	d
�dd�Zd
S)�NoSuchResourcez�
    The given URI is not present in a registry.

    Unlike most exceptions, this class *is* intended to be publicly
    instantiable and *is* part of the public API of the package.
    r�ref�object�bool��other�returncCs$|j|jurtSt�|�t�|�kS�N��	__class__�NotImplemented�attrs�astuple��selfr
�r�G/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/referencing/exceptions.py�__eq__szNoSuchResource.__eq__�int�rcCstt�|��Sr��hashrr�rrrr�__hash__"szNoSuchResource.__hash__N��__name__�
__module__�__qualname__�__doc__�__annotations__rrrrrrrs
rc@s8eZdZUdZded<ddd�dd�Zd	d
�dd�Zd
S)�NoInternalIDa
    A resource has no internal ID, but one is needed.

    E.g. in modern JSON Schema drafts, this is the :kw:`$id` keyword.

    One might be needed if a resource was to-be added to a registry but no
    other URI is available, and the resource doesn't declare its canonical URI.
    �
Resource[Any]�resourcer
rrcCs$|j|jurtSt�|�t�|�kSrrrrrrr3szNoInternalID.__eq__rrcCstt�|��Srrrrrrr8szNoInternalID.__hash__Nr rrrrr&&s
	r&c@s8eZdZUdZded<ddd�dd�Zd	d
�dd�Zd
S)�
UnretrievablezO
    The given URI is not present in a registry, and retrieving it failed.
    rr	r
rrcCs$|j|jurtSt�|�t�|�kSrrrrrrrDszUnretrievable.__eq__rrcCstt�|��SrrrrrrrIszUnretrievable.__hash__Nr rrrrr)<s
r)c@s8eZdZUdZded<ddd�dd�Zd	d
�dd�Zd
S)�CannotDetermineSpecificationz�
    Attempting to detect the appropriate `Specification` failed.

    This happens if no discernible information is found in the contents of the
    new resource which would help identify it.
    r�contentsr
rrcCs$|j|jurtSt�|�t�|�kSrrrrrrrXsz#CannotDetermineSpecification.__eq__rrcCstt�|��Srrrrrrr]sz%CannotDetermineSpecification.__hash__Nr rrrrr*Ms
r*c@s8eZdZUdZded<ddd�dd�Zd	d
�dd�Zd
S)�Unresolvablez'
    A reference was unresolvable.
    rr	r
rrcCs$|j|jurtSt�|�t�|�kSrrrrrrriszUnresolvable.__eq__rrcCstt�|��SrrrrrrrnszUnresolvable.__hash__Nr rrrrr,as
r,c@s(eZdZUdZded<dd�dd�ZdS)	�PointerToNowherezK
    A JSON Pointer leads to a part of a document that does not exist.
    r'r(�strrcCs*|j�d|jj��}|jdkr&|d7}|S)N� does not exist within �/z�. The pointer '/' is a valid JSON Pointer but it points to an empty string property ''. If you intended to point to the entire resource, you should use '#'.)r	r(r+)r�msgrrr�__str__zs
�zPointerToNowhere.__str__N�r!r"r#r$r%r2rrrrr-rs
r-c@s0eZdZUdZded<ded<dd�dd�Zd	S)
�NoSuchAnchorz@
    An anchor does not exist within a particular resource.
    r'r(r.�anchorrcCs|j�d|jj��S)Nr/)r5r(r+rrrrr2�s�zNoSuchAnchor.__str__Nr3rrrrr4�s
r4c@s0eZdZUdZded<ded<dd�dd�Zd	S)
�
InvalidAnchorzu
    An anchor which could never exist in a resource was dereferenced.

    It is somehow syntactically invalid.
    r'r(r.r5rcCsd|j�d|j�d�S)Nz'#zo' is not a valid anchor, neither as a plain name anchor nor as a JSON Pointer. You may have intended to use '#/zD', as the slash is required *before each segment* of a JSON pointer.)r5rrrrr2�s
��zInvalidAnchor.__str__Nr3rrrrr6�s
r6)r$�
__future__r�typingrrrZreferencing._attrsrZreferencingrZreferencing.typingr�KeyErrorr�	Exceptionr&r)r*r,r-r4r6rrrr�<module>s.