o
    lÇhL  ã                   @   sF   d dl Z e  d¡ZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )	é    Nz	[\.\[\]]+c                   @   ó   e Zd ZdZdS )ÚJsonSchemaExceptionz7
    Base exception of ``fastjsonschema`` library.
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r	   r	   úm/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fastjsonschema/exceptions.pyr      ó    r   c                       s:   e Zd ZdZd	‡ fdd„	Zedd„ ƒZedd„ ƒZ‡  ZS )
ÚJsonSchemaValueExceptionaÏ  
    Exception raised by validation function. Available properties:

     * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``),
     * invalid ``value`` (e.g. ``60``),
     * ``name`` of a path in the data structure (e.g. ``data.property[index]``),
     * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``),
     * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``),
     * ``rule`` which the ``value`` is breaking (e.g. ``maximum``)
     * and ``rule_definition`` (e.g. ``42``).

    .. versionchanged:: 2.14.0
        Added all extra properties.
    Nc                    s.   t ƒ  |¡ || _|| _|| _|| _|| _d S ©N)ÚsuperÚ__init__ÚmessageÚvalueÚnameÚ
definitionÚrule)Úselfr   r   r   r   r   ©Ú	__class__r	   r
   r      s   
z!JsonSchemaValueException.__init__c                 C   s   dd„ t  | j¡D ƒS )Nc                 S   s   g | ]}|d kr|‘qS )Ú r	   )Ú.0Úitemr	   r	   r
   Ú
<listcomp>'   s    z1JsonSchemaValueException.path.<locals>.<listcomp>)ÚSPLIT_REÚsplitr   ©r   r	   r	   r
   Úpath%   s   zJsonSchemaValueException.pathc                 C   s   | j r| jsd S | j | j ¡S r   )r   r   Úgetr   r	   r	   r
   Úrule_definition)   s   z(JsonSchemaValueException.rule_definition)NNNN)	r   r   r   r   r   Úpropertyr   r!   Ú__classcell__r	   r	   r   r
   r      s    
r   c                   @   r   )ÚJsonSchemaDefinitionExceptionz?
    Exception raised by generator of validation function.
    Nr   r	   r	   r	   r
   r$   0   r   r$   )ÚreÚcompiler   Ú
ValueErrorr   r   r$   r	   r	   r	   r
   Ú<module>   s
    
#