<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
cookiecutter.cli
-----------------

Main `cookiecutter` CLI.
"""

from __future__ import unicode_literals

import os
import sys
import logging

import click

from cookiecutter import __version__
from cookiecutter.main import cookiecutter
from cookiecutter.exceptions import (
    OutputDirExistsException, InvalidModeException
)

logger = logging.getLogger(__name__)


def print_version(context, param, value):
    if not value or context.resilient_parsing:
        return
    click.echo('Cookiecutter %s from %s (Python %s)' % (
        __version__,
        os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
        sys.version[:3]
    ))
    context.exit()


@click.command()
@click.version_option(__version__, '-V', '--version')<commit_msg>Make sure to display the known version message<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
cookiecutter.cli
-----------------

Main `cookiecutter` CLI.
"""

from __future__ import unicode_literals

import os
import sys
import logging

import click

from cookiecutter import __version__
from cookiecutter.main import cookiecutter
from cookiecutter.exceptions import (
    OutputDirExistsException, InvalidModeException
)

logger = logging.getLogger(__name__)


def version_msg():
    python_version = sys.version[:3]
    location = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    message = 'Cookiecutter %(version)s from {} (Python {})'
    return message.format(location, python_version)


def print_version(context, param, value):
    if not value or context.resilient_parsing:
        return
    click.echo('Cookiecutter %s from %s (Python %s)' % (
        __version__,
        os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
        sys.version[:3]
    ))
    context.exit()


@click.command()
@click.version_option(__version__, '-V', '--version', message=version_msg())
{'fraction_non_alphanumeric': 0.13542739443872295, 'fraction_numerical': 0.0025746652935118436, 'mean_word_length': 3.7390243902439027, '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': '4358826', 'n_tokens_mistral': 608, 'n_tokens_neox': 594, 'n_words': 139}