<commit_before>from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]<commit_msg>Cargar clases en __init__ de commands<commit_after>from os.path import dirname, basename, isfile
import glob
import inspect
from commands.base.command import Command
modules = glob.glob(dirname(__file__)+"/*.py")
modules = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
__all__ = modules

classes = []
for imod in __all__:
    mod = __import__('commands.' + imod, fromlist=[''])

    for name, obj in inspect.getmembers(mod):
        if inspect.isclass(obj) and name != 'Command' and issubclass(obj, Command):
            classes.append(obj)
{'fraction_non_alphanumeric': 0.13607990012484394, 'fraction_numerical': 0.0024968789013732834, 'mean_word_length': 4.854014598540146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7278952', 'n_tokens_mistral': 267, 'n_tokens_neox': 261, 'n_words': 77}