Your IP : 3.17.76.163
B
�pSe�- � @ sL d dl Z d dlmZmZmZmZmZmZmZ d dl m
Z
mZ d dlm
Z
dd� Zdd� Zd d
� Zdd� Zd
d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Z d+d,� Z!d-d.� Z"d/d0� Z#d1d2� Z$d3d4� Z%d5d6� Z&d7d8� Z'd9d:� Z(d;d<� Z)d=d>� Z*d?d@� Z+dAdB� Z,dCdD� Z-dS )E� N)�ensure_list�equal�
extras_msg�find_additional_properties� types_msg�unbool�uniq)�FormatError�ValidationError)� iteritemsc c sn | � |d�sd S xXt|�D ]L\}}xBt|�D ]6\}}t�||�r,x | j||||d�D ]
}|V qTW q,W qW d S )N�object)�path�schema_path)�is_typer �re�search�descend) � validator�patternProperties�instance�schema�pattern� subschema�k�v�error� r �G/opt/alt/python37/lib/python3.7/site-packages/jsonschema/_validators.pyr s r c c s@ | � |d�sd S x*|D ]"}x| j||d�D ]
}|V q*W qW d S )Nr )r r )r r )r �
propertyNamesr r �propertyr r r r r s
r c c s� | � |d�sd S tt||��}| � |d�r^x�|D ](}x"| j|| ||d�D ]
}|V qJW q0W n~|s�|r�d|kr�t|d �}t|�dkr�d}nd}dd�ttt|���|d�tt|��f }t |�V nd }t |t
|� �V d S )
Nr )r
r � Zdoes�doz&%s %s not match any of the regexes: %sz, z8Additional properties are not allowed (%s %s unexpected))r �setr r �sorted�len�join�map�reprr
r ) r ZaPr r �extras�extrar �patternsZverbr r r �additionalProperties) s(
r+ c c s� | � |d�sd S | � |d�r`xxtt|�|�D ].\\}}}x | j||||d�D ]
}|V qLW q,W n6x4t|�D ](\}}x| j|||d�D ]
}|V q�W qjW d S )N�array)r
r )r
)r �zip� enumerater )r �itemsr r �index�itemr r r r r r/ E s r/ c c s� | � |d�r | � |�di �d�r$d S t|�dg ��}| � |d�r�x�t||d � |d�D ](\}}x| j|||d�D ]
}|V qpW qVW nF|s�t|�t|�dg ��kr�d}t|t|t|�dg ��d � � �V d S )Nr, r/ r )�start)r
z3Additional items are not allowed (%s %s unexpected))r �getr$ r. r r
r )r ZaIr r Z len_itemsr0 r1 r r r r �additionalItemsU s r4 c c s t ||�std|f �V d S )Nz%r was expected)r r
)r �constr r r r r r5 i s
r5 c # s<