U
    [e                     @   sh   d dl mZ d dlmZ d dlmZ dd Zdd Zdd	 Zd
d Z	dd Z
dd Zdd Zdd ZdS )    )_utils)	iteritems)ValidationErrorc           	      c   s   |  |dsd S t|D ]\}}||kr*q|  |drT| j|||dD ]
}|V  qFq|  |dr|||krtd||f V  q|D ]"}||krd}t|||f V  qqd S )Nobjectschema_pathstringz%r is a dependency of %r)is_typer   descendr   )		validatordependenciesinstanceschemaproperty
dependencyerrorZeachmessage r   _/var/www/html/services/stratfitenv/lib/python3.8/site-packages/jsonschema/_legacy_validators.pydependencies_draft3   s*      


r   c                 c   s8   t |D ](}| |d|gir
td||f V  q
d S )Ntypez%r is disallowed for %r)r   ensure_listZis_validr   )r   Zdisallowr   r   Z
disallowedr   r   r   disallow_draft3   s
    
r   c                 c   sZ   |  |dr(| ||D ]
}|V  qd S t|D ]$\}}| j|||dD ]
}|V  qHq0d S )Nr   r   )r	   r
   	enumerate)r   Zextendsr   r   r   index	subschemar   r   r   extends_draft3'   s    r   c                 c   s   |  |dsd S |  |drLt|D ]$\}}| j|||dD ]
}|V  q<q$n:tt||D ]*\\}}}| j||||dD ]
}|V  qxqZd S )Narrayr   )pathr   r   )r	   r   r
   zip)r   itemsr   r   r   itemr   r   r   r   r   items_draft3_draft41   s       
r#   c                 c   sR   |  |dsd S |ddr*||k}d}n||k }d}|rNtd|||f V  d S )NnumberZexclusiveMinimumFzless than or equal toz	less thanz%r is %s the minimum of %rr	   getr   )r   minimumr   r   failedcmpr   r   r   minimum_draft3_draft4A   s    r*   c                 c   sR   |  |dsd S |ddr*||k}d}n||k}d}|rNtd|||f V  d S )Nr$   ZexclusiveMaximumFzgreater than or equal tozgreater thanz%r is %s the maximum of %rr%   )r   maximumr   r   r(   r)   r   r   r   maximum_draft3_draft4R   s    r,   c                 c   s   |  |dsd S t|D ]\}}||krL| j|| |||dD ]
}|V  q>q|ddrtd| }|jd|d ||d |j| |j	|dg |V  qd S )Nr   r   requiredFz%r is a required property)r   Zvalidator_valuer   r   )
r	   r   r
   r&   r   _setr   
appendleftr   extend)r   
propertiesr   r   r   r   r   r   r   r   properties_draft3c   s,    

r2   c                 c   s   t |}g }t|D ]P\}}| |drTt| j|||d}|sH d S || q| ||r d S qtt |||dV  d S )Nr   r   )context)	r   r   r   r	   listr
   r0   r   Z	types_msg)r   typesr   r   
all_errorsr   r   errorsr   r   r   type_draft3}   s    

 r8   N)Z
jsonschemar   Zjsonschema.compatr   Zjsonschema.exceptionsr   r   r   r   r#   r*   r,   r2   r8   r   r   r   r   <module>   s   
