<commit_before>import sys


def add_hook(always=False, style='default', debug=False):
    if sys.stderr.isatty() or always:
        try:
            import pygments
            colorizer = Colorizer(style, debug)
            sys.excepthook = colorizer.colorize_traceback
        except ImportError:
            if debug:<commit_msg>Suppress 'unused import' flake8 warning<commit_after>import sys


def add_hook(always=False, style='default', debug=False):
    if sys.stderr.isatty() or always:
        try:
            import pygments  # flake8:noqa
            colorizer = Colorizer(style, debug)
            sys.excepthook = colorizer.colorize_traceback
        except ImportError:
            if debug:
{'fraction_non_alphanumeric': 0.0851063829787234, 'fraction_numerical': 0.0028368794326241137, 'mean_word_length': 2.495049504950495, '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': '6186453', 'n_tokens_mistral': 205, 'n_tokens_neox': 202, 'n_words': 48}