File: //lib/python3/dist-packages/jsonschema/__pycache__/_format.cpython-310.pyc
o
    >��]�-  �                   @   s�  d dl Z d dlZd dlZd dlZd dlmZ d dlmZ G dd� de�Z	e	� Z
e	� Ze	� Ze	� Z
ee
eee
d�Z						dTdd	�Zed
d�edd�d
d� ��Ze�d�Zeddddd�dd� �Zeed�rvedejejefd�dd� �Ze�d�Zeddddd�dd� �Zzd dlZW n	 ey�   Y nw edejd�d d!� �Zzd dlZW n/ ey�   zd d"l m!Z! W n	 ey�   Y nw ed#d�d$d%� �Z"ed&d&ed'�d(d)� �Z#Y n*w ed*ed�d+d,� �Z$ed-ed�d.d/� �Z%ed#ed�d0d%� �Z"ed&d&ed'�d1d)� �Z#zd d2l&m'Z' W n e�y(   zd d2l(m'Z' W n e�y%   dZ'Y nw Y nw e'�r>ed3d�d4d5� �Z)ed6d7�d8d9� �Z*ed:ejd�d;d<� �Z+ed=d=ed>�d?d@� �Z,ed6edA�dBdC� �Z-zd dl.Z.W n
 e�yn   Y nw dDdE� Z/edFee0fdA�dGdH� �Z1dIdJ� Z2zd dl3Z3W n
 e�y�   Y nw edKdKe3j4d'�dLdM� �Z5edNe3j4d�dOdP� �Z6zd dl7Z8W n e�y�   Y dS w edQdQe8j9j:d'�e8�;� �<� fdRdS��Z=dS )U�    N)�	str_types)�FormatErrorc                   @   sH   e Zd ZdZi Zddd�Zdd� Zddd	�Zee�Z	d
d� Z
dd
� ZdS )�
FormatCheckera�  
    A ``format`` property checker.
    JSON Schema does not mandate that the ``format`` property actually do any
    validation. If validation is desired however, instances of this class can
    be hooked into validators to enable format validation.
    `FormatChecker` objects always return ``True`` when asked about
    formats that they do not know how to validate.
    To check a custom format using a function that takes an instance and
    returns a ``bool``, use the `FormatChecker.checks` or
    `FormatChecker.cls_checks` decorators.
    Arguments:
        formats (~collections.Iterable):
            The known formats to validate. This argument can be used to
            limit which formats will be used during validation.
    Nc                    s4   |d u r� j �� � _ d S t� fdd�|D ��� _ d S )Nc                 3   s   � | ]
}|� j | fV  qd S �N��checkers)�.0�k��self� �4/usr/lib/python3/dist-packages/jsonschema/_format.py�	<genexpr>'