<commit_before># -*- coding: utf-8 -*-
import sys
import argparse

from flask_reveal.tools.commands import list_subcommands, load_subcomand


class CLI(argparse.ArgumentParser):
    info = ({
        'prog': 'flaskreveal',
        'description': 'An easy way to make reveal.js presentations',
        'formatter_class': argparse.RawDescriptionHelpFormatter,
        'usage': '%(prog)s [-h] subcommand [options] [args]'
    })

    def __init__(self):
        super().__init__(**self.info)

        self.subcommand = None
        self.subcommand_list = list_subcommands()
        self.add_argument('subcommand')

        self.epilog = '[subcommands]\n'
        for subcommand in self.subcommand_list:
            self.epilog += '    {0}\n'.format(subcommand)

    def parse_known_args(self, args=None, namespace=None):
        return super().parse_known_args(args, self)[1]

    def run(self, args=None):
        subcommand_args = self.parse_known_args()

        if self.subcommand in self.subcommand_list:
            command = load_subcomand(self.subcommand)

            command.run(subcommand_args)
        else:
            self.error('subcommand not found')


def cli_execute():
    cli = CLI()

    cli.run(sys.argv[1:])<commit_msg>fix forget to pass args to parsing method<commit_after># -*- coding: utf-8 -*-
import sys
import argparse

from flask_reveal.tools.commands import list_subcommands, load_subcomand


class CLI(argparse.ArgumentParser):
    info = ({
        'prog': 'flaskreveal',
        'description': 'An easy way to make reveal.js presentations',
        'formatter_class': argparse.RawDescriptionHelpFormatter,
        'usage': '%(prog)s [-h] subcommand [options] [args]'
    })

    def __init__(self):
        super().__init__(**self.info)

        self.subcommand = None
        self.subcommand_list = list_subcommands()
        self.add_argument('subcommand')

        self.epilog = '[subcommands]\n'
        for subcommand in self.subcommand_list:
            self.epilog += '    {0}\n'.format(subcommand)

    def parse_known_args(self, args=None, namespace=None):
        return super().parse_known_args(args, self)[1]

    def run(self, args=None):
        subcommand_args = self.parse_known_args(args)

        if self.subcommand in self.subcommand_list:
            command = load_subcomand(self.subcommand)

            command.run(subcommand_args)
        else:
            self.error('subcommand not found')


def cli_execute():
    cli = CLI()

    cli.run(sys.argv[1:])
{'fraction_non_alphanumeric': 0.12111553784860558, 'fraction_numerical': 0.0031872509960159364, 'mean_word_length': 2.8277439024390243, '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': '3068679', 'n_tokens_mistral': 799, 'n_tokens_neox': 755, 'n_words': 160}