<commit_before># noqa
from dodo_commands.system_commands import DodoCommand
from dodo_commands.dodo_activate import Activator


class Command(DodoCommand):  # noqa
    help = ""
    decorators = []

    def add_arguments_imp(self, parser):  # noqa
        parser.add_argument('project', nargs='?')

        group = parser.add_mutually_exclusive_group()
        group.add_argument('--latest', action="store_true")
        group.add_argument('--create', action="store_true")

    def handle_imp(self, project, latest, create, **kwargs):  # noqa
        Activator().run(project, latest, create)<commit_msg>Fix crash when no project is specified<commit_after># noqa
from dodo_commands.system_commands import DodoCommand, CommandError
from dodo_commands.dodo_activate import Activator


class Command(DodoCommand):  # noqa
    help = ""
    decorators = []

    def add_arguments_imp(self, parser):  # noqa
        parser.add_argument('project', nargs='?')

        group = parser.add_mutually_exclusive_group()
        group.add_argument('--latest', action="store_true")
        group.add_argument('--create', action="store_true")

    def handle_imp(self, project, latest, create, **kwargs):  # noqa
        if not project and not latest:
            raise CommandError("No project was specified")
        Activator().run(project, latest, create)
{'fraction_non_alphanumeric': 0.114668652271035, 'fraction_numerical': 0.0, 'mean_word_length': 3.851985559566787, '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': '2260375', 'n_tokens_mistral': 398, 'n_tokens_neox': 388, 'n_words': 91}