• File: cli.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/jsonschema/__pycache__/cli.cpython-37.pyc
  • Date Modified: 07/08/2021 10:56 AM
  • File size: 2.38 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

`	@sdZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZddZd	d
Z
ejddZejd
ddde
ddejdddddejddeddejddedejdd e
d!d"d#Zejd$dfd%d&Zejejfd'd(ZdS))z"
The ``jsonschema`` command line.
)absolute_importN)__version__)namedAny)
validator_forcCsd|krd|}t|S)N.zjsonschema.)r)namer?/opt/alt/python37/lib/python3.7/site-packages/jsonschema/cli.py_namedAnyWithDefaultsr
c	Cst|}t|SQRXdS)N)openjsonload)pathfilerrr	
_json_files
rzJSON 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))rrcCs6ttj|pdgd}|ddkr2t|d|d<|S)Nz--help)args	validatorr)varsparser
parse_argsr)r	argumentsrrr	rDsrcCsttt|dddS)N)r)r )sysexitrunr)rrrr	mainKsr%cCsp|d}|d|dd}||dd}x>|dp8dD].}x(||D]}||j|dd	}qJWq:W|S)
Nerror_formatrr)rFrr)errorT)Zcheck_schemaZiter_errorswriteformat)r stdoutstderrr&rZerroredinstancer'rrr	r$Osr$)__doc__Z
__future__rargparserr"Z
jsonschemarZjsonschema._reflectrZjsonschema.validatorsrr
rArgumentParserradd_argumentrargvr%r*r+r$rrrr	<module>sH