<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    pSe	                 @   s   d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ dd Zd	d
 ZejddZejddddedd ejddddd ejddedd ejdded ejdd ed! d"d# Zejd$d fd%d&Zejejfd'd(ZdS ))z"
The ``jsonschema`` command line.
    )absolute_importN)__version__)namedAny)validator_forc             C   s   d| krd|  } t | S )N.zjsonschema.)r   )name r   ?/opt/alt/python37/lib/python3.7/site-packages/jsonschema/cli.py_namedAnyWithDefault   s    r
   c          	   C   s   t | }t|S Q R X d S )N)openjsonload)pathfiler   r   r	   
_json_file   s    
r   zJSON Schema Validation CLI)Zdescriptionz-iz
--instanceappend	instancesz\a path to a JSON instance (i.e. filename.json) to validate (may be specified multiple times))actiondesttypehelpz-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)defaultr   z-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.)r   r   z	--versionversion)r   r   schemaz3the JSON Schema to validate with (i.e. schema.json))r   r   c             C   s6   t tj| pdgd}|d d kr2t|d |d< |S )Nz--help)args	validatorr   )varsparser
parse_argsr   )r   	argumentsr   r   r	   r   D   s    r      c             C   s   t tt| dd d S )N)r   )r   )sysexitrunr   )r   r   r   r	   mainK   s    r$   c             C   sp   | d }| d | d d}| | d  d}x>| d p8dD ].}x(||D ]}||j|d d	}qJW q:W |S )
Nerror_formatr   r   )r   Fr   r   )errorT)Zcheck_schemaZiter_errorswriteformat)r   stdoutstderrr%   r   Zerroredinstancer&   r   r   r	   r#   O   s    r#   )__doc__Z
__future__r   argparser   r!   Z
jsonschemar   Zjsonschema._reflectr   Zjsonschema.validatorsr   r
   r   ArgumentParserr   add_argumentr   argvr$   r)   r*   r#   r   r   r   r	   <module>   sH   