File: //var/opt/nydus/ops/jsonschema/__pycache__/cli.cpython-39.pyc
a
�,�h� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl Z ddlZddl
Z
ddlZddlZddl
mZmZ ddlmZ dd lmZmZ ejd
edd� G d
d� de�ZeG dd� d��ZeG dd� d��ZeG dd� d��Zdd� Ze jdd�Zejdddddd� ejdd d!d"� ejd#d$d%d&gd%d'd(� ejd)d*ed+d,� ejd-d.d"� ejd/d0e� d1�d2� ejd3d4d"� d5d6� Z!d7d8� Z"e
j#d9d� fd:d;�Z$e
j%e
j&e
j'fd<d=�Z(dS )>z"
The ``jsonschema`` command line.
� )�metadata)�JSONDecodeError��resolve_name)�dedentN)�define�field)�SchemaError)�_RefResolver�
validator_forz�The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead, which can be installed from https://pypi.org/project/check-jsonschema/� )�
stacklevelc @ s e Zd ZdS )�_CannotLoadFileN)�__name__�
__module__�__qualname__� r r �?/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/jsonschema/cli.pyr s r c @ sR e Zd Ze� Ze� Ze� Zedd� �Zdd� Z dd� Z
dd� Zd d
� Zdd� Z
d
S )�
_Outputterc C s: |d dkrt |d �}n|d dkr,t� }| |||d�S )N�output�plain�error_format�pretty)� formatter�stdout�stderr)�_PlainFormatter�_PrettyFormatter)�cls� argumentsr r r r r r �from_arguments* s
z_Outputter.from_argumentsc C s� zt |�}W n> tyJ } z&| j|t�� d� t� |�W Y d }~n
d }~0 0 |�j zt�|�W W d � S ty� } z&| j |t�� d� t� |�W Y d }~n
d }~0 0 W d � n1 s�0 Y d S )N��path�exc_info)
�open�FileNotFoundError�filenotfound_error�sysr# r �json�loadr �
parsing_error)�selfr"