# Path: src/lupin/validators/validator.py
# class Validator(object):
#     """Validators base class"""
# 
#     def __and__(self, other):
#         """Combine current validator with another one using the & operator
# 
#         Returns:
#             ValidatorsAndCombination
#         """
#         return lupin.ValidatorsAndCombination([self, other])
# 
#     def __or__(self, other):
#         """Combine current validator with another one using the | operator
# 
#         Returns:
#             ValidatorsOrCombination
#         """
#         return lupin.ValidatorsOrCombination([self, other])
# 
# Path: src/lupin/errors.py
# class NotNone(ValidationError):
#     """Error raised by `IsNone` validator"""
# 
#     def __init__(self, invalid, path):
#         """
#         Args:
#             invalid (str): invalid value
#             path (list): path of the invalid data
#         """
#         message = "Value is not None : %s" % (invalid)
#         super(NotNone, self).__init__(message, path)
#         self.invalid = invalid


from . import Validator
from ..errors import NotNone


class IsNone(Validator):
    """Validate that a value is None"""

    def __call__(self, value, path):
        """Validate that value is None

        Args:
            value (object): value to validate
            path (list): error path
        """
        if value is not None:

# Path: src/lupin/validators/validator.py
# class Validator(object):
#     """Validators base class"""
# 
#     def __and__(self, other):
#         """Combine current validator with another one using the & operator
# 
#         Returns:
#             ValidatorsAndCombination
#         """
#         return lupin.ValidatorsAndCombination([self, other])
# 
#     def __or__(self, other):
#         """Combine current validator with another one using the | operator
# 
#         Returns:
#             ValidatorsOrCombination
#         """
#         return lupin.ValidatorsOrCombination([self, other])
# 
# Path: src/lupin/errors.py
# class NotNone(ValidationError):
#     """Error raised by `IsNone` validator"""
# 
#     def __init__(self, invalid, path):
#         """
#         Args:
#             invalid (str): invalid value
#             path (list): path of the invalid data
#         """
#         message = "Value is not None : %s" % (invalid)
#         super(NotNone, self).__init__(message, path)
#         self.invalid = invalid


# Path: src/lupin/validators/is_none.py
from . import Validator
from ..errors import NotNone



class IsNone(Validator):
    """Validate that a value is None"""

    def __call__(self, value, path):
        """Validate that value is None

        Args:
            value (object): value to validate
            path (list): error path
        """
        if value is not None:

            raise NotNone(value, path)