관리-도구
편집 파일: error_reporting.cpython-311.pyc
� ,�Re, � � � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm Z d dl mZmZm Z mZmZmZmZmZ ddlmZ ej e� � Zddd d d�ZdZh d �Z ej d� � Z ej dej � � Zddddd�Z G d� de� � Z ed� � � Z! G d� d� � Z" G d� d� � Z#de$dee$ fd�Z%dS )� N)�contextmanager)�indent�wrap)�Any�Dict�Iterator�List�Optional�Sequence�Union�cast� )�JsonSchemaValueExceptionzkeys 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> �not�anyOf�items�oneOf�contains� propertyNamesz\W+|([A-Z][^A-Z\W]*)z^[\w_]+$�table�key�keys)�object�property� properties�property namesc �: � e Zd ZdZdZdZdZedefd�� � 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 �exc �X � t |� � } | t |� � |j |j |j |j � � }t j dd� � � � � }|dk r|j |j c|_ |_ |j |_ |j |_ |j |_ |S )N� JSONSCHEMA_DEBUG_CODE_GENERATION�false)�_ErrorFormatting�str�value�name� definition�rule�os�getenv�lower� __cause__� __traceback__�message�_original_message�summary�details)�clsr � formatter�obj� debug_codes ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/config/_validate_pyproject/error_reporting.py�_from_jsonschemaz ValidationError._from_jsonschema= s� � �$�R�(�(� ��c�#�i�.�.�"�(�I�N�B�M�2�7�S�S���Y�A�7�K�K�Q�Q�S�S� ��� � �/1�|�R�=M�,�C�M�3�,� "� ����'����'���� � N) �__name__� __module__�__qualname__�__doc__r1 r2 r0 �classmethodr r8 � r9 r7 r r ( sV � � � � � �� � �G��G���� �":� � � � �[� � � r9 r c # �n K � d V � d S # t $ r } t � | � � d �d } ~ ww xY w�N)r r r8 )r s r7 �detailed_errorsrB J sM � � � �=� �������#� =� =� =��.�.�r�2�2��<�����=���s � � 4�/�4c �v � e Zd Zdefd�Zdefd�Zedefd�� � Zedefd�� � Z d� Z d� Zdefd �Zd S )r$ r c �� � || _ d| � |j � � � d�| _ | j j � |j | j � � | _ d| _ d| _ d S )N�`r )r �_simplify_namer'