Skip to content

Instantly share code, notes, and snippets.

@maliciousgroup
Created April 7, 2021 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maliciousgroup/bf75f6983309e5baf0515799a44c4965 to your computer and use it in GitHub Desktop.
Save maliciousgroup/bf75f6983309e5baf0515799a44c4965 to your computer and use it in GitHub Desktop.
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