File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-310.pyc
Back
o ;j%. � @ s\ d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z m Z d dlmZmZm Z mZmZmZmZmZ ddlmZ ejrYd dlZejdk rSd dlmZ nd dlmZ e�e�Zd d ddd �ZdZh d�Ze� d�Z!e� dej"�Z#ddddd�Z$dZ%G dd� de�Z&ede d fdd��Z'G dd� d�Z(G dd � d �Z)d!e*dee* fd"d#�Z+dS )$� N)�contextmanager)�indent�wrap)�Any�Dict� Generator�Iterator�List�Optional�Sequence�Union� )�JsonSchemaValueException)� � )�Selfzkeys must be named byzat least one item that matches� z"only items matching the definition)z(must be named by propertyName definitionzone of contains definitionz same as const definition:zonly specified items)zmust not be emptyzis always invalidzmust not be there> �oneOf�items�allOf� propertyNames�contains�anyOf�notz\W+|([A-Z][^A-Z\W]*)z^[\w_]+$�table�key�keys)�object�property� properties�property namesz} For more details about `format` see https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html c @ s2 e Zd ZdZdZdZdZededdfdd��Z dS ) �ValidationErrora� Report violations of a given JSON schema. This class extends :exc:`~fastjsonschema.JsonSchemaValueException` by adding the following properties: - ``summary``: an improved version of the ``JsonSchemaValueException`` error message with only the necessary information) - ``details``: more contextual information about the error like the failing schema itself and the value that violates the schema. Depending on the level of the verbosity of the ``logging`` configuration the exception message will be only ``summary`` (default) or a combination of ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`). r �ex�returnr c C sj t |�}| t|�|j|j|j|j�}t�dd��� }|dkr'|j |j |_ |_ |j|_|j |_ |j|_|S )NZ JSONSCHEMA_DEBUG_CODE_GENERATION�false)�_ErrorFormatting�str�value�name� definition�rule�os�getenv�lower� __cause__� __traceback__�message�_original_message�summary�details)�clsr"