# Path: typepy/checker/_interface.py
# class TypeCheckerInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def is_type(self) -> bool:  # pragma: no cover
#         pass
# 
#     @abc.abstractmethod
#     def validate(self) -> None:  # pragma: no cover
#         pass


import abc
from ._interface import TypeCheckerInterface
class CheckerFactory:
    __slots__ = ("__min_strict_level", "__max_strict_level", "__checker_mapping")

    @property
    def min_strict_level(self):
        return self.__min_strict_level

    @property
    def max_strict_level(self):
        return self.__max_strict_level

    def __init__(self, checker_mapping):
        self.__checker_mapping = checker_mapping

        self.__min_strict_level = min(checker_mapping)
        self.__max_strict_level = max(checker_mapping)
        self.__checker_mapping[None] = self.__max_strict_level

    def get_checker_class(self, strict_level=None):
        checker_class = self.__checker_mapping.get(strict_level)
        if checker_class:
            return checker_class
        if strict_level < self.min_strict_level:
            return self.__checker_mapping[self.min_strict_level]
        if strict_level > self.max_strict_level:
            return self.__checker_mapping[self.max_strict_level]

        raise ValueError(f"unexpected strict level: {strict_level}")



# Path: typepy/checker/_interface.py
# class TypeCheckerInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def is_type(self) -> bool:  # pragma: no cover
#         pass
# 
#     @abc.abstractmethod
#     def validate(self) -> None:  # pragma: no cover
#         pass


# Path: typepy/checker/_checker.py
import abc
from ._interface import TypeCheckerInterface

class CheckerFactory:
    __slots__ = ("__min_strict_level", "__max_strict_level", "__checker_mapping")

    @property
    def min_strict_level(self):
        return self.__min_strict_level

    @property
    def max_strict_level(self):
        return self.__max_strict_level

    def __init__(self, checker_mapping):
        self.__checker_mapping = checker_mapping

        self.__min_strict_level = min(checker_mapping)
        self.__max_strict_level = max(checker_mapping)
        self.__checker_mapping[None] = self.__max_strict_level

    def get_checker_class(self, strict_level=None):
        checker_class = self.__checker_mapping.get(strict_level)
        if checker_class:
            return checker_class
        if strict_level < self.min_strict_level:
            return self.__checker_mapping[self.min_strict_level]
        if strict_level > self.max_strict_level:
            return self.__checker_mapping[self.max_strict_level]

        raise ValueError(f"unexpected strict level: {strict_level}")



class TypeCheckerBase(TypeCheckerInterface):