def find_subcommands():
    'Finds all subcommand classes'
    clsmembers = inspect.getmembers(sys.modules[__name__], inspect.isclass)
    subclasses = [cls for cls in clsmembers if (issubclass(cls[1], (Subcommand, LocalSubcommand)) and (cls[1] not in [Subcommand, LocalSubcommand]))]
    subcommands = []
    for subclass in subclasses:
        name = '-'.join([part.lower() for part in re.findall('[A-Z][a-z]*', subclass[0])])
        subcommands.append((name, subclass[1]))
    return subcommands
Finds all subcommand classes
def find_subcommands():
    
    clsmembers = inspect.getmembers(sys.modules[__name__], inspect.isclass)
    subclasses = [cls for cls in clsmembers if (issubclass(cls[1], (Subcommand, LocalSubcommand)) and (cls[1] not in [Subcommand, LocalSubcommand]))]
    subcommands = []
    for subclass in subclasses:
        name = '-'.join([part.lower() for part in re.findall('[A-Z][a-z]*', subclass[0])])
        subcommands.append((name, subclass[1]))
    return subcommands