
    `(                     :    d dl mZmZ d dlmZ edd            ZdS )   )MaxMin)	validatorNc                     ||t          d          |t          }|t          }	 ||k    }n# t          $ r	 ||k     }Y nw xY w|rt          d          || k    o|| k    S )a  
    Validate that a number is between minimum and/or maximum value.

    This will work with any comparable type, such as floats, decimals and dates
    not just integers.

    This validator is originally based on `WTForms NumberRange validator`_.

    .. _WTForms NumberRange validator:
       https://github.com/wtforms/wtforms/blob/master/wtforms/validators.py

    Examples::

        >>> from datetime import datetime

        >>> between(5, min=2)
        True

        >>> between(13.2, min=13, max=14)
        True

        >>> between(500, max=400)
        ValidationFailure(func=between, args=...)

        >>> between(
        ...     datetime(2000, 11, 11),
        ...     min=datetime(1999, 11, 11)
        ... )
        True

    :param min:
        The minimum required value of the number. If not provided, minimum
        value will not be checked.
    :param max:
        The maximum value of the number. If not provided, maximum value
        will not be checked.

    .. versionadded:: 0.2
    Nz1At least one of `min` or `max` must be specified.z `min` cannot be more than `max`.)AssertionErrorr   r   	TypeError)valueminmax
min_gt_maxs       2lib/python3.11/site-packages/validators/between.pybetweenr      s    R {s{?
 
 	
 {
{3Y

   3Y


 A?@@@%<(C5L(s   . A A)NN)extremesr   r   utilsr   r        r   <module>r      sY                  7) 7) 7) 7) 7) 7)r   