File: //home/arjun/projects/env/lib/python3.10/site-packages/attr/__pycache__/validators.cpython-310.pyc
o
"we�P � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZmZ ddl m
Z
mZmZm
Z
ddlmZ dd lmZ g d
�Zdd� Zd
d� Zedd� �Ze
dddd�G dd� d��Zdd� Ze
dddd�G dd� d��ZdPdd�Ze
dddd�G dd� d��Zdd � Ze
dddd�G d!d"� d"��Zd#d$� Ze
dddd�G d%d&� d&��Zd'd(� Ze
dddd�G d)d*� d*��Z d+d,� Z!e
dddd�G d-d.� d.��Z"dQd/d0�Z#e
dddd�G d1d2� d2��Z$dQd3d4�Z%e
dddd�G d5d6� d6��Z&d7d8� Z'd9d:� Z(d;d<� Z)d=d>� Z*e
dddd�G d?d@� d@��Z+dAdB� Z,e
dddd�G dCdD� dD��Z-dEdF� Z.e
dddd�G dGdH� dH��Z/dIdJ� Z0e
dddd�G dKdL� dL��Z1de2e3fdM�dNdO�Z4dS )Rz
Commonly useful validators.
� N)�contextmanager)�Pattern� )�get_run_validators�set_run_validators)�
_AndValidator�and_�attrib�attrs)�default_if_none)�NotCallableError)r �
deep_iterable�deep_mapping�disabled�ge�get_disabled�gt�in_�instance_of�is_callable�le�lt�
matches_re�max_len�min_len�not_�optional�provides�set_disabledc C s t | � dS )a
Globally disable or enable running validators.
By default, they are run.
:param disabled: If ``True``, disable running all validators.
:type disabled: bool
.. warning::
This function is not thread-safe!
.. versionadded:: 21.3.0
N�r )r � r �H/home/arjun/projects/env/lib/python3.10/site-packages/attr/validators.pyr + s r c C s t � S )z�
Return a bool indicating whether validators are currently disabled or not.
:return: ``True`` if validators are currently disabled.
:rtype: bool
.. versionadded:: 21.3.0
)r r r r r! r = � r c c s* � t d� z
dV W t d� dS t d� w )z�
Context manager that disables running validators within its context.
.. warning::
This context manager is not thread-safe!
.. versionadded:: 21.3.0
FNTr r r r r! r I s
�r FT)�repr�slots�hashc @ �"