Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module_registry: dict = {}
class ModuleRegistry(object):
@staticmethod
def register_module(cls) -> None:
if cls.__name__ not in module_registry:
module_registry[cls.__name__] = cls
@staticmethod
def dump_register() -> dict:
return module_registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment