"""Check modules. Every module in this package (and its sub-packages) is imported at registration, so dropping a ``.py`` file containing ``Check`` subclasses anywhere in here is enough to add checks. Sub-packages are only used for grouping, the ``contexts`` attribute of each check decides where it runs. """ import importlib import pkgutil def load_all(): """Import every check module so their classes register themselves.""" for info in pkgutil.walk_packages(__path__, __name__ + "."): importlib.import_module(info.name)