File: //home/arjun/projects/env/lib/python3.10/site-packages/jsonschema/__pycache__/cli.cpython-310.pyc
o
+we� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddl Z ddl
Z
zddlmZ W n e
y? ddlmZ Y nw ddlmZmZ ddlmZ dd lmZmZ e
jd
edd� G d
d� de�ZeG dd� d��ZeG dd� d��ZeG dd� d��Zdd� Zejdd�Z e j!dddddd� e j!dd d!d"� e j!d#d$d%d&gd%d'd(� e j!d)d*ed+d,� e j!d-d.d"� e j!d/d0e�"d1�d2� e j!d3d4d"� d5d6� Z#d7d8� Z$ej%d9d� fd:d;�Z&ej'ej(ej)fd<d=�Z*dS )>z"
The ``jsonschema`` command line.
� )�metadata)�JSONDecodeError)�dedentN��resolve_name)�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 �G/home/arjun/projects/env/lib/python3.10/site-packages/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 dkr
t |d �}n |d dkrt� }| |||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 ty | j|t�� d� t� �w |�" z
t�|�W W d � S ty= | j |t�� d� t� �w 1 sAw Y d S )N��path�exc_info)
�open�FileNotFoundError�filenotfound_error�sysr# r �json�loadr �
parsing_error)�selfr"