<commit_before>from pip.basecommand import Command, SUCCESS, ERROR
from pip.exceptions import CommandError


class HelpCommand(Command):
    name = 'help'
    usage = '%prog'
    summary = 'Show available commands'

    def run(self, options, args):
        from pip.commands import commands

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except:
            return SUCCESS

        if cmd_name not in commands:
            raise CommandError('unknown command "%s"' % cmd_name)

        command = commands[cmd_name](self.main_parser)  # instantiate
        command.parser.print_help()

        return SUCCESS<commit_msg>fix bare except statement<commit_after>from pip.basecommand import Command, SUCCESS, ERROR
from pip.exceptions import CommandError


class HelpCommand(Command):
    name = 'help'
    usage = '%prog'
    summary = 'Show available commands'

    def run(self, options, args):
        from pip.commands import commands

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except IndexError:
            return SUCCESS

        if cmd_name not in commands:
            raise CommandError('unknown command "%s"' % cmd_name)

        command = commands[cmd_name](self.main_parser)  # instantiate
        command.parser.print_help()

        return SUCCESS
{'fraction_non_alphanumeric': 0.07914151576123407, 'fraction_numerical': 0.0013413816230717639, 'mean_word_length': 2.510588235294118, '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': '4970490', 'n_tokens_mistral': 408, 'n_tokens_neox': 387, 'n_words': 133}