a $]@shddlmZddlmZddlmZddZddZdd Zd d Z d d Z ddZ ddZ ddZ dS))_utils) iteritems)ValidationErrorc cs||dsdSt|D]\}}||vr*q||drT|j|||dD] }|VqFq||dr|||vrtd||fVq|D]"}||vrd}t|||fVqqdS)Nobject schema_pathstringz%r is a dependency of %r)is_typerdescendr) validatorZ dependenciesinstanceschemapropertyZ dependencyerrorZeachmessagerA/usr/lib/python3.9/site-packages/jsonschema/_legacy_validators.pydependencies_draft3s&      rccs8t|D](}||d|gir td||fVq dS)Ntypez%r is disallowed for %r)r ensure_listZis_validr)r Zdisallowr r Z disallowedrrrdisallow_draft3s  rccsZ||dr(|||D] }|VqdSt|D]$\}}|j|||dD] }|VqHq0dS)Nrr)r r enumerate)r Zextendsr r rindex subschemarrrextends_draft3's rccs||dsdS||drLt|D]$\}}|j|||dD] }|Vqq|ddrtd|}|jd|d||d|j||j |dg|VqdS)NrrrequiredFz%r is a required property)r Zvalidator_valuer r ) r rr r#rZ_setr appendleftrextend)r Z propertiesr r rrrrrrproperties_draft3cs,      r+ccst|}g}t|D]P\}}||drTt|j|||d}|sHdS||q|||rdSqtt|||dVdS)Nrr)context) rrrr listr r*rZ types_msg)r typesr r Z all_errorsrrerrorsrrr type_draft3}s     r0N)Z jsonschemarZjsonschema.compatrZjsonschema.exceptionsrrrrr r&r'r+r0rrrrs