<commit_before>import logging
import sys
import textwrap
from logging import CRITICAL, DEBUG, ERROR, INFO, WARNING

from colorama import Fore, Style

from bonobo import settings
from bonobo.util.term import CLEAR_EOL

iswindows = (sys.platform == 'win32')


def get_format():
    yield '{b}[%(fg)s%(levelname)s{b}][{w}'
    yield '{b}][{w}'.join(('%(spent)04d', '%(name)s'))
    yield '{b}]'
    yield ' %(fg)s%(message)s{r}'
    yield CLEAR_EOL


colors = {
    'b': '' if iswindows else Fore.BLACK,
    'w': '' if iswindows else Fore.LIGHTBLACK_EX,
    'r': '' if iswindows else Style.RESET_ALL,
}
format = (''.join(get_format())).format(**colors)


class Filter(logging.Filter):<commit_msg>[logging] Removes kill-until-eol character on windows platform.<commit_after>import logging
import sys
import textwrap
from logging import CRITICAL, DEBUG, ERROR, INFO, WARNING

from colorama import Fore, Style

from bonobo import settings
from bonobo.util.term import CLEAR_EOL

iswindows = (sys.platform == 'win32')


def get_format():
    yield '{b}[%(fg)s%(levelname)s{b}][{w}'
    yield '{b}][{w}'.join(('%(spent)04d', '%(name)s'))
    yield '{b}]'
    yield ' %(fg)s%(message)s{r}'
    if not iswindows:
        yield CLEAR_EOL


colors = {
    'b': '' if iswindows else Fore.BLACK,
    'w': '' if iswindows else Fore.LIGHTBLACK_EX,
    'r': '' if iswindows else Style.RESET_ALL,
}
format = (''.join(get_format())).format(**colors)


class Filter(logging.Filter):
{'fraction_non_alphanumeric': 0.16826265389876882, 'fraction_numerical': 0.005471956224350205, 'mean_word_length': 4.479400749063671, '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': '5128219', 'n_tokens_mistral': 542, 'n_tokens_neox': 512, 'n_words': 134}