kf dZddlmZddlZddlZddlZddlmZddlm Z ddl m Z dZ dZ ejd Zed d d de deddddedde deddeedde d Zejd!dfd"Zejejfd#ZdS)$z" The ``jsonschema`` command line. )absolute_importN) __version__namedAny) validator_forc2d|vrd|z}t|S)N.z jsonschema.r)names n/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jsonschema/cli.py_namedAnyWithDefaultr s! $t# D>>c|t|5}tj|cdddS#1swxYwYdS)N)openjsonload)pathfiles r _json_filersz dtys 155zJSON Schema Validation CLI) descriptionz-iz --instanceappend instancesz\a path to a JSON instance (i.e. filename.json) to validate (may be specified multiple times))actiondesttypehelpz-Fz--error-formatz"{error.instance}: {error.message} zthe format to use for each error output message, specified in a form suitable for passing to str.format, which will be called with 'error' for each error)defaultrz-Vz --validatorzthe fully qualified object name of a validator to use, or, for validators that are registered with jsonschema, simply the name of the class.)rrz --versionversion)rrschemaz3the JSON Schema to validate with (i.e. schema.json))rrctt|pdg}|dt|d|d<|S)Nz--helpargs validatorr)varsparser parse_argsr)r! argumentss r r%r%DsOV&&D,>XJ&??@@I%!.y/B!C!C + r cftjtt|dS)Nr )r&)sysexitrunr%r s r mainr,Ks.HS:4000 1 1 122222r c |d}|d|d}||dd}|dpdD]E}||D]-}|||d }.F|S) N error_formatr"r)rFr)errorT) check_schema iter_errorswriteformat)r&stdoutstderrr.r"erroredinstancer0s r r+r+Os^,L& +&i.ABBBI 9X.///Gk*0b**844  E LL,,5,99 : : :GG  Nr )__doc__ __future__rargparserr) jsonschemarjsonschema._reflectrjsonschema.validatorsrr rArgumentParserr$ add_argumentr%argvr,r5r6r+r/r r rBs'&&&&& """"""((((((//////  ! ,   ,    8      1 & -       > hqrrl3333*SZ      r