�
�r�c� � �l � d dl mZ d dlmZ d� Zd� Zd� Zd� Zd� Zd� Z d � Z
d
� Zd� Zd� Z
d
� Zd� Zd� ZdS )� )�_utils)�ValidationErrorc �b � | � d� � }|�d|fgS | � � � S )z�
Ignore siblings of ``$ref`` if it is present.
Otherwise, return all keywords.
Suitable for use with `create`'s ``applicable_validators`` argument.
z$ref)�get�items)�schema�refs �?/usr/lib/python3/dist-packages/jsonschema/_legacy_validators.py�ignore_ref_siblingsr s4 � � �*�*�V�
�
�C�
����
����|�|�~�~�� c # � K � | � |d� � sd S |� � � D ]�\ }}||vr�
| � |d� � r| � |||�� � E d {V �� �?| � |d� � r||vr|�d|��}t |� � V � �r|D ]}||vr|�d|��}t |� � V � ���d S )N�object��schema_path�string� is a dependency of )�is_typer �descendr )� validator�dependencies�instancer �property�
dependency�message�eachs r
�dependencies_draft3r sN � � � ����X�x�0�0� ��� ,� 2� 2� 4� 4� 3� 3���*��8�#�#�����Z��2�2� 3� �(�(��*�(� )� � �
�
�
�
�
�
�
�
� �
�
�z�8�
4�
4� 3���)�)�'�K�K�x�K�K��%�g�.�.�.�.�.��"�
3�
3���x�'�'�!%�I�I�X�I�I�G�)�'�2�2�2�2�2��
3�3� 3r c # �$ K � | � |d� � sdS |� � � D ]`\ }}||vr�
| � |d� � r"|D ]}||vr|�d|��}t |� � V � ��B| � |||�� � E d{V �� �adS )z�
Support for the ``dependencies`` keyword from pre-draft 2019-09.
In later drafts, the keyword was split into separate
``dependentRequired`` and ``dependentSchemas`` validators.
r N�arrayr r )r r r r )r r r r r r r r s r
�!dependencies_draft4_draft6_draft7r + s � � � � ���X�x�0�0� ��� ,� 2� 2� 4� 4� � ���*��8�#�#�����Z��1�1� �"�
3�
3���x�'�'�!%�I�I�X�I�I�G�)�'�2�2�2�2�2��
3�
!�(�(��*�(� )� � �
�
�
�
�
�
�
�
�� r c # � K � t j |� � D ]F}| � d|gi�� � � |� � r|�d|��}t |� � V � �Gd S )N�type�r z is disallowed for )r �ensure_list�evolve�is_validr )r �disallowr r �
disallowedr s r
�disallow_draft3r( I s� � � � ��(��2�2� +� +�
����F�Z�L�#9��:�:�C�C�H�M�M� +�#�F�F�(�F�F�G�!�'�*�*�*�*�*��+� +r c # �� K � | � |d� � r| � ||� � E d {V �� d S t |� � D ]#\ }}| � |||�� � E d {V �� �$d S )Nr r )r r � enumerate)r �extendsr r �index� subschemas r
�extends_draft3r. P s� � � � �����(�+�+� ��$�$�X�w�7�7�7�7�7�7�7�7�7���%�g�.�.� M� M���y��$�$�X�y�e�$�L�L�L�L�L�L�L�L�L�L�M� Mr c # �Z K � | � |d� � sd S | � |d� � r5t |� � D ]#\ }}| � |||�� � E d {V �� �$d S t t |� � |� � D ]'\ \ }}}| � ||||�� � E d {V �� �(d S )Nr r ��path�r1 r )r r* r �zip�r r r r r, �itemr- s r
�items_draft3_draft4r6 X s � � � ����X�w�/�/� ��������)�)� �$�X�.�.� B� B�K�E�4� �(�(��u�5�(�A�A�A�A�A�A�A�A�A�A� B� B� ),�I�h�,?�,?��(G�(G� � �$�M�U�D�9� �(�(��i�e�� )� � �
�
�
�
�
�
�
�
� � r c # �Z K � | � |d� � sd S | � |d� � rGt t |� � |� � D ]'\ \ }}}| � ||||�� � E d {V �� �(d S t |� � D ]#\ }}| � |||�� � E d {V �� �$d S )Nr r2 r0 )r r3 r* r r4 s r
�items_draft6_draft7_draft201909r8 f s � � � ����X�w�/�/� ��������(�(� B�(+�I�h�,?�,?��(G�(G� � �$�M�U�D�9� �(�(��i�e�� )� � �
�
�
�
�
�
�
�
� � �
%�X�.�.� B� B�K�E�4� �(�(��u�5�(�A�A�A�A�A�A�A�A�A�A� B� Br c # �� K � | � |d� � sd S |� dd� � r ||k }d}n||k }d}|r|�d|� d|��}t |� � V � d S d S )N�number�exclusiveMinimumFzless than or equal toz less than� is z the minimum of �r r r )r �minimumr r �failed�cmpr s r
�minimum_draft3_draft4rA t s� � � � ����X�x�0�0� ���
�z�z�$�e�,�,� ��W�$��%����G�#����
� '��E�E�S�E�E�'�E�E���g�&�&�&�&�&�&�&�'� 'r c # �� K � | � |d� � sd S |� dd� � r ||k }d}n||k }d}|r|�d|� d|��}t |� � V � d S d S )Nr: �exclusiveMaximumFzgreater than or equal tozgreater thanr< |