nicfit/command.py
def register(Class, CommandSubClass):
        """A class decorator for Command classes to register."""
        for name in [CommandSubClass.name()] + CommandSubClass.aliases():
            if name in Class._registered_commands[Class]:
                raise ValueError("Command already exists: " + name)
            Class._registered_commands[Class][name] = CommandSubClass
        return CommandSubClass
def register(Class, CommandSubClass):
        """A class decorator for Command classes to register."""
        for name in [CommandSubClass.name()] + CommandSubClass.aliases():
            if name in Class._registered_commands[Class]:
                raise ValueError("Command already exists: " + name)
            Class._registered_commands[Class][name] = CommandSubClass
        return CommandSubClass
A class decorator for Command classes to register.