%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/jsonschema/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/jsonschema/__pycache__/_validators.cpython-312.pyc

�

`��d�<��>�ddlmZddlmZmZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZddlmZmZd�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d �Z,d!�Z-d"�Z.d#�Z/d$�Z0d%�Z1d&�Z2d'�Z3d(�Z4d)�Z5d*�Z6y)+�)�Fraction)�	urldefrag�urljoinN)�ensure_list�equal�
extras_msg�find_additional_properties�%find_evaluated_item_indexes_by_schema�&find_evaluated_property_keys_by_schema�unbool�uniq)�FormatError�ValidationErrorc#�K�|j|d�sy|j�D]Q\}}|j�D]9\}}tj||�s�|j	||||��Ed{����;�Sy7�	�w�N�object��path�schema_path)�is_type�items�re�search�descend)�	validator�patternProperties�instance�schema�pattern�	subschema�k�vs        �8/usr/lib/python3/dist-packages/jsonschema/_validators.pyrrs��������X�x�0��/�5�5�7������N�N�$�	�D�A�q��y�y��!�$�$�,�,��y�q�g�-����	���s�AA=�A=�1A;�2
A=c#�zK�|j|d�sy|D]}|j||��Ed{����y7��w)Nr)rr)rr)r�
propertyNamesrr�propertys     r#r%r%sF�������X�x�0���N���$�$�h�}�$�M�M�M�N�M�s�/;�9�;c#�K�|j|d�sytt||��}|j|d�r'|D]!}|j||||��Ed{����#y|s�|r�d|vrpt	|�dk(rd}nd}djd�t
|�D��}djd	�t
|d�D��}|�d
|�d|��}	t|	���yd}	t|	t|�z���yyy7���w)
Nr�rr��does�do�, c3�2K�|]}t|����y�w�N��repr��.0�eachs  r#�	<genexpr>z'additionalProperties.<locals>.<genexpr>6s����E�d�t�D�z�E���c3�2K�|]}t|����y�wr.r/r1s  r#r4z'additionalProperties.<locals>.<genexpr>7s����!�#��T�
�!�r5� z not match any of the regexes: z8Additional properties are not allowed (%s %s unexpected))	r�setr	r�len�join�sortedrr)
r�aPrr�extras�extra�verb�joined�patterns�errors
          r#�additionalPropertiesrC&s�������X�x�0��
�+�H�f�=�
>�F�����X�&��	J�E� �(�(��%��"�5�(�I�I�I�	J�
�F��&�(��6�{�a�������Y�Y�E�f�V�n�E�E�F��y�y�!�'-�f�5H�.I�'J�!��H��h�a��v�%D�X�J�O�E�!�%�(�(�N�E�!�%�*�V�*<�"<�=�=��R�
J�s�AC<�C:�BC<c#� K�|j|d�syt|jdg��}t|�}|dur||kDrd|�d|��}t|���yt	||�D]!}|j||||��Ed{����#y7��w)N�array�prefixItemsFzExpected at most z items, but found )rrr)rr9�getr�ranger)rrrr�prefix�total�message�indexs        r#rrAs��������X�w�/��
����M�2�.�
/�F���M�E���~�%�&�.�%�f�X�-?��w�G���g�&�&��6�5�)�	�E� �(�(�!�%����)��
�
�	�
�s�BB�B�Bc#�K�|j|d�r"|j|jdi�d�ryt|jdg��}|j|d�r5t||d|��D]!\}}|j	|||��Ed{����#y|s`t|�t|jdg��kDr8d}t|t
|t|jdg��d�z���yyy7�j�w)NrErr)�startr(z3Additional items are not allowed (%s %s unexpected))rrGr9�	enumeraterrr)r�aIrr�	len_itemsrL�itemrBs        r#�additionalItemsrSSs��������h��0����V�Z�Z���4�h�?���F�J�J�w��+�,�I�����X�&�$�X�i�j�%9��K�	?�K�E�4� �(�(��r��(�>�>�>�	?�
�C��M�C��
�
�7�B�(?�$@�@�E����J�x��F�J�J�w��,C�(D�(E�F�G�G�
�	
�A�R�
?�s�BC?�C=�A+C?c#�FK�t||�st|�d����yy�w)Nz
 was expected)rr)r�constrrs    r#rUrUes'������5�!���	��7�8�8�"�s�!c#�K�|j|d�syd}|jdd�}|jdt|��}|D]D}|j|��j	|�s�%|dz
}||kDs�0td|�d�d|�	���y||kr+|st|�d
����ytd|�d|�d
�d|�	���yy�w)NrEr�minContainsr)�maxContains�rz8Too many items match the given schema (expected at most �))r�validator_valuez1 does not contain items matching the given schemaz8Too few items match the given schema (expected at least z
 but only z	 matched))rrGr9�evolve�is_validr)r�containsrr�matches�min_contains�max_containsr3s        r#r^r^js��������X�w�/���G��:�:�m�Q�/�L��:�:�m�S��]�;�L��
�����8��,�5�5�d�;��q�L�G���%�%�)�)5��a�9�+�$0�	���
�����!��,�,�,��
�
"�J��.�
�7�)�9�>�'� ,�	�
��s�A)B?�,
B?�7AB?c#�bK�|j|d�sy||krt|�d|�����yy�w)N�numberz) is less than or equal to the minimum of �rr)r�minimumrrs    r#�exclusiveMinimumrf�sG�������X�x�0���7����l��%�[�
*�
�	
����-/c#�bK�|j|d�sy||k\rt|�d|�����yy�w)Nrcz, is greater than or equal to the maximum of rd)r�maximumrrs    r#�exclusiveMaximumrj�sG�������X�x�0���7����l�!�!(��
-�
�	
��rgc#�fK�|j|d�sy||kr|�d|��}t|���yy�w)Nrcz is less than the minimum of rd)rrerrrKs     r#rere�sB�������X�x�0���'���L� =�g�[�I���g�&�&����/1c#�fK�|j|d�sy||kDr|�d|��}t|���yy�w)Nrcz  is greater than the maximum of rd)rrirrrKs     r#riri�sB�������X�x�0���'���L� @���L���g�&�&��rlc#�K�|j|d�syt|t�r||z}	t|�|k7}n||z}|rt|�d|�����yy#t$r't|�t|�zjdk7}Y�EwxYw�w)Nrcr)z is not a multiple of )r�
isinstance�float�int�
OverflowErrorr�denominatorr)r�dBrr�quotient�faileds      r#�
multipleOfrw�s��������X�x�0���"�e���b�=��
	J���]�h�.�F��B���
����,B�2�$�G�H�H����	J��x�(�8�B�<�7�D�D��I�F�	J�s'�)B	�A�B	�-B�B	�B�B	c#�pK�|j|d�r t|�|krt|�d����yyy�w)NrE�
 is too short�rr9r�r�mIrrs    r#�minItemsr}�s<��������7�+��H�
��0B����M�:�;�;�1C�+���46c#�pK�|j|d�r t|�|kDrt|�d����yyy�w)NrE� is too longrzr{s    r#�maxItemsr��s<��������7�+��H�
��0B����L�9�:�:�1C�+�r~c#�pK�|r0|j|d�rt|�st|�d����yyyy�w)NrEz has non-unique elements)rr
r)r�uIrrs    r#�uniqueItemsr��sB����
����h��0��X�����,D�E�F�F��
1�	�r~c#�K�|j|d�r*tj||�st|�d|�����yyy�w)N�stringz does not match )rrrr)r�patrnrrs    r#rr�sE�������(�H�-��	�	�%��*����,<�U�I�F�G�G�+�	.�s�>Ac#��K�|j�	|jj||�yy#t$r-}t|j|j
����Yd}~yd}~wwxYw�w)N)�cause)�format_checker�checkrrrKr�)r�formatrrrBs     r#r�r��s[�������+�	D��$�$�*�*�8�V�<�,���	D�!�%�-�-�u�{�{�C�C��	D�s*�
A'�.�A'�	A$�#A�A'�A$�$A'c#�pK�|j|d�r t|�|krt|�d����yyy�w)Nr�ryrz�r�mLrrs    r#�	minLengthr��s<��������8�,��X���1C����M�:�;�;�2D�,�r~c#�pK�|j|d�r t|�|kDrt|�d����yyy�w)Nr�r�rzr�s    r#�	maxLengthr��s<��������8�,��X���1C����L�9�:�:�2D�,�r~c#�K�|j|d�sy|j�D]*\}}||vr�|D]}||vs�|�d|��}t|�����,y�w)Nrz is a dependency of )rrr)r�dependentRequiredrrr&�
dependencyr3rKs        r#r�r��st�������X�x�0�� 1� 7� 7� 9�/���*��8�#���	/�D��8�#�!�H�$8���E��%�g�.�.�	/�	/�s
�8A�Ac#�K�|j|d�sy|j�D]&\}}||vr�|j|||��Ed{����(y7��w)Nr�r�rrr)r�dependentSchemasrrr&r�s      r#r�r�sj�������X�x�0�� 0� 6� 6� 8�
���*��8�#���$�$��j�h�%�
�	
�	
�
�	
�s�AA�A�	Ac#��K�|dk(s|dk(r3t|��t�fd�|D��rt|�d|�����yy||vrt|�d|�����yy�w)Nrr)c3�:�K�|]}�t|�k7���y�wr.)r)r2r3�unbooleds  �r#r4zenum.<locals>.<genexpr>s�����:�D�x�6�$�<�'�:�s�z is not one of )r�allr)r�enumsrrr�s    @r#�enumr�sj������1�}��A�
��(�#���:�E�:�:�!�X�L���y�"I�J�J�;�	��	����O�E�9�E�F�F�
�s�AAc#�K�t|jdd�}|�?|jj|�5}|j||�Ed{���ddd�y|jj	|�\}}|jj|�	|j||�Ed{���|jj
�y7�|#1swYyxYw7�-#|jj
�wxYw�w)N�resolve)�getattr�resolver�	resolvingrr��
push_scope�	pop_scope)r�refrrr��resolved�scopes       r#r�r� s������i�(�(�)�T�:�G���
�
�
�
)�
)�#�
.�	=�(� �(�(��8�<�<�<�	=�	=�$�,�,�4�4�S�9���x����%�%�e�,�	+� �(�(��8�<�<�<����(�(�*�
=��	=�	=��
=�����(�(�*�sY�5C9�C�
C
�C�AC9�C�*C�+C�/C9�
C�C�C9�C�C6�6C9c#��K�t|�\}}|jjD]c}t||�}|jj	|�5}d|vr-||dk(r%|j||�Ed{���	ddd�yddd��e|jj	|�5}|j||�Ed{���ddd�y7�X#1swY��xYw7�#1swYyxYw�w)Nz$dynamicAnchor)rr��
_scopes_stackrr�r)	r�
dynamicRefrr�_�fragment�url�
lookup_urlr s	         r#r�r�/s������J�'�K�A�x��!�!�/�/�	>���S�*�-�
�
�
�
�
)�
)�*�
5�	�� �I�-� �I�.>�$?�?�$�,�,�X�y�A�A�A��		�	�	�	>��
�
�
)�
)�*�
5�	>�� �(�(��9�=�=�=�	>�	>�B��	�	��
>��	>�	>�sZ�AC(�"C�3C�4C�9/C(�(C�>C�?C�	C(�C�C	�C(�C�C%�!C(c#���K�t|�}t��fd�|D��s+djd�|D��}t��d|�����yy�w)Nc3�B�K�|]}�j�|����y�wr.)r)r2�typerrs  ��r#r4ztype.<locals>.<genexpr>As�����C�T�y� � ��4�0�C�s�r,c3�2K�|]}t|����y�wr.r/)r2r�s  r#r4ztype.<locals>.<genexpr>Bs����7��$�t�*�7�r5z is not of type )r�anyr:r)r�typesrr�reprss` `  r#r�r�>sP��������E��C�U�C�C��	�	�7��7�7�����,<�U�G�D�E�E�D�s�A
Ac#�K�|j|d�sy|j�D]*\}}||vs�|j|||||��Ed{����,y7��wrr�)r�
propertiesrrr&r s      r#r�r�Fsq�������X�x�0��)�/�/�1����)��x�� �(�(���"���$�	)��
�
��
�s�.A�A�A�
Ac#�jK�|j|d�sy|D]}||vs�t|�d�����y�w)Nrz is a required propertyrd)r�requiredrrr&s     r#r�r�TsE�������X�x�0���J���8�#�!�X�L�0G�"H�I�I�J�s�3�3c#�pK�|j|d�r t|�|krt|�d����yyy�w)Nrz  does not have enough propertiesrz�r�mPrrs    r#�
minPropertiesr�\s=��������8�,��X���1C����,L�M�N�N�2D�,�r~c#�K�|j|d�sy|j|d�r t|�|kDrt|�d����yyy�w)Nrz has too many propertiesrzr�s    r#�
maxPropertiesr�asP�������X�x�0������8�,��X���1C����,D�E�F�F�2D�,�s�AA	c#�nK�t|�D]!\}}|j|||��Ed{����#y7��w)Nr�)rOr)r�allOfrrrLr s      r#r�r�hs?����%�e�,�M���y��$�$�X�y�e�$�L�L�L�M�L�s�)5�3�5c#�K�g}t|�D]7\}}t|j|||���}|sy|j|��9t	|�d�|����y�w)Nr��, is not valid under any of the given schemas��context)rO�listr�extendr)r�anyOfrr�
all_errorsrLr �errss        r#r�r�msq�����J�%�e�,�	
���y��I�%�%�h�	�u�%�M�N�������$��		
���l�F�G��
�	
�s�AAc#�K�t|�}g}|D]9\}}t|j|||���}|s|}	n%|j|��;t	|�d�|����|D�
�cgc](\}
}|j|��j
|�r|��*}}
}|r<|j	�djd�|D��}
t	|�d|
�����yycc}}
w�w)Nr�r�r�rYr,c3�2K�|]}t|����y�wr.r/)r2rs  r#r4zoneOf.<locals>.<genexpr>�s����@�6�$�v�,�@�r5z is valid under each of )	rOr�rr�rr\r]�appendr:)r�oneOfrr�
subschemasr�rLr r��first_validr�r3�
more_validr�s              r#r�r�{s�����5�!�J��J�&�

���y��I�%�%�h�	�u�%�M�N���#�K�����$��

���l�F�G��
�	
�'����D����4��(�1�1�(�;�	
��J������+�&��	�	�@�Z�@�@�����,D�U�G�L�M�M���	�s�A#C�%-C�ACc#�xK�|j|��j|�r|�d|��}t|���yy�w)NrYz should not be valid under )r\r]r)r�
not_schemarrrKs     r#�not_r��sC�������z��*�3�3�H�=��L� ;�J�>�J���g�&�&�>�s�8:c#��K�|j|��j|�r'd|vr"|d}|j||d��Ed{���yyd|vr"|d}|j||d��Ed{���yy7�-7��w)NrY�thenr��else)r\r]r)r�	if_schemarrr��else_s      r#�if_r��s��������y��)�2�2�8�<��V���&�>�D� �(�(��4�V�(�L�L�L��
�6�	��v����$�$�X�u�&�$�I�I�I�
�
M��	J�s$�AA6�A2�&A6�+A4�,A6�4A6c#��K�|j|d�syt|||�}t|�D��cgc]\}}||vr|��
}}}|rd}t|t	|�z���yycc}}w�w)NrEz4Unevaluated items are not allowed (%s %s unexpected))rr
rOrr)	r�unevaluatedItemsrr�evaluated_item_indexesrLrR�unevaluated_itemsrBs	         r#r�r��s��������X�w�/��B��8�V���!*�(� 3������.�.�	
�����F���e�j�1B�&C�C�D�D���	�s�/A)�A#�(A)c#�K�|j|d�syt|||�}g}|D]5}||vs�|j|||||��D]}|j|���7|rd}t	|t|�z���yy�w)Nrrz9Unevaluated properties are not allowed (%s %s unexpected))rrrr�rr)	r�unevaluatedPropertiesrr�evaluated_property_keys�unevaluated_property_keysr&r�rBs	         r#r�r��s��������X�x�0��D��8�V���!#���;���2�2��&�&���"�%��$�	'��
;��*�0�0��:�

;�;�!�K���e�j�1J�&K�K�L�L�!�s�,A>�AA>c#�K�|j|d�sytt|�|�D]%\\}}}|j||||��Ed{����'y7��w)NrE)rrrr)r�ziprOr)rrFrrrLrRr s       r#rFrF�sk�������X�w�/��$'�	�(�(;�[�$I�
� �
���y��$�$�����	%�
�	
�	
�
�	
�s�A
A�A�
A)7�	fractionsr�urllib.parserrr�jsonschema._utilsrrrr	r
rrr
�jsonschema.exceptionsrrrr%rCrrSrUr^rfrjrerirwr}r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rF��r#�<module>r�s����+�	�	�	�	�?�	�N�>�6�$
�$9�
 �F
�
�'�'�I�6<�
;�
G�H�D�<�
;�
/�	
�G�+�>�F��J�O�
G�M�

�N�2'�J�E�M�,

r�

Zerion Mini Shell 1.0