$L iPhdZddlmZddlmZmZddlZddlmZer ddl m Z ddl m Z eGdd e ZeGd d eZeGd d e ZeGddeZejGddeZeGddeZeGddeZeGddeZy)z Errors, oh no! ) annotations) TYPE_CHECKINGAnyN)frozen)Resource)URIc,eZdZUdZded<ddZddZy) 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. rrefc|j|jurtStj|tj|k(SN __class__NotImplementedattrsastupleselfothers \/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/referencing/exceptions.py__eq__zNoSuchResource.__eq__5 >> 0! !}}T"emmE&:::c>ttj|Sr hashrrrs r__hash__zNoSuchResource.__hash__"EMM$'((rNrobjectreturnboolr"int__name__ __module__ __qualname____doc____annotations__rrrrr r s H; )rr c,eZdZUdZded<ddZddZy) 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]resourcec|j|jurtStj|tj|k(Sr rrs rrzNoInternalID.__eq__3rrc>ttj|Sr rrs rrzNoInternalID.__hash__8rrNr r$r&r,rrr.r.&s; )rr.c,eZdZUdZded<ddZddZy) UnretrievablezO The given URI is not present in a registry, and retrieving it failed. rr c|j|jurtStj|tj|k(Sr rrs rrzUnretrievable.__eq__Drrc>ttj|Sr rrs rrzUnretrievable.__hash__IrrNr r$r&r,rrr4r4< H; )rr4c,eZdZUdZded<ddZddZy) 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. rcontentsc|j|jurtStj|tj|k(Sr rrs rrz#CannotDetermineSpecification.__eq__Xrrc>ttj|Sr rrs rrz%CannotDetermineSpecification.__hash__]rrNr r$r&r,rrr9r9MsM; )rr9c,eZdZUdZded<ddZddZy) Unresolvablez' A reference was unresolvable. rr c|j|jurtStj|tj|k(Sr rrs rrzUnresolvable.__eq__irrc>ttj|Sr rrs rrzUnresolvable.__hash__nrrNr r$r&r,rrr>r>ar7rr>c$eZdZUdZded<ddZy)PointerToNowherezK A JSON Pointer leads to a part of a document that does not exist. r/r0cx|jd|jj}|jdk(r|dz }|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 r0r:)rmsgs r__str__zPointerToNowhere.__str__zsC 3DMM4J4J3MN 88s? > C  rNr"strr'r(r)r*r+rGr,rrrBrBrsrrBc.eZdZUdZded<ded<ddZy) NoSuchAnchorz@ An anchor does not exist within a particular resource. r/r0rIanchorcL|jd|jjS)NrD)rMr0r:rs rrGzNoSuchAnchor.__str__s%{{o4T]]5K5K4N O rNrHrJr,rrrLrLs K rrLc.eZdZUdZded<ded<ddZy) InvalidAnchorzu An anchor which could never exist in a resource was dereferenced. It is somehow syntactically invalid. r/r0rIrMc<d|jd|jdS)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.)rMrs rrGzInvalidAnchor.__str__s*  &* * rNrHrJr,rrrPrPs  K rrP)r* __future__rtypingrrrreferencing._attrsr referencingrreferencing.typingrKeyErrorr Exceptionr.r4r9r>rBrLrPr,rrrYs#% %$&)X))&)9))* )H ) ) )9))& )9 ) ) |$  <     L  r