Your IP : 216.73.216.196


Current Path : /opt/alt/python35/lib/python3.5/site-packages/jsonschema/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/jsonschema/__pycache__/cli.cpython-35.opt-1.pyc



�$�]f�@s;ddlmZddlZddlZddlZddlmZddlmZdd�Z	dd�Z
ejd	d
�Zej
ddd
dddde
dd�ej
dddddd�ej
ddde	dd�ej
dddde
�dd�Zejd d�d!d"�Zejejd#d$�ZdS)%�)�absolute_importN)�namedAny)�
validator_forcCs d|krd|}t|�S)N�.zjsonschema.)r)�name�r�?/opt/alt/python35/lib/python3.5/site-packages/jsonschema/cli.py�_namedAnyWithDefault
s
r	c	Cs't|��}tj|�SWdQRXdS)N)�open�json�load)�path�filerrr�
_json_filesrZdescriptionzJSON Schema Validation CLIz-iz
--instance�action�append�dest�	instances�type�helpz[a path to a JSON instance (i.e. filename.json)to validate (may be specified multiple times)z-Fz--error-format�defaultz"{error.instance}: {error.message}
z�the 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 errorz-Vz--validatorz�the fully qualified object name of a validator to use, or, for validators that are registered with jsonschema, simply the name of the class.�schemaz7the JSON Schema to validate with (i.e. filename.schema)cCsIttjd|pdg��}|ddkrEt|d�|d<|S)N�argsz--help�	validatorr)�vars�parser�
parse_argsr)r�	argumentsrrrr;s!r�cCs#tjtdtd|���dS)Nrr)�sys�exit�runr)rrrr�mainBsr"cCs�|d}|dd|d�}|j|d�d}xQ|dpHfD]?}x6|j|�D]%}|j|jd|��d}q_WqIW|S)N�error_formatrrFr�errorT)Zcheck_schemaZiter_errors�write�format)r�stdout�stderrr#rZerrored�instancer$rrrr!Fs
r!)Z
__future__r�argparserrZjsonschema._reflectrZjsonschema.validatorsrr	r�ArgumentParserr�add_argumentr�argvr"r'r(r!rrrr�<module>s<