<commit_before># -*- coding: utf-8 -*-
"""
pytest_instafail
~~~~~~~~~~~~~~~~

py.test plugin to show failures instantly.

:copyright: see LICENSE for details
:license: BSD, see LICENSE for more details.
"""
import pytest
import pytest, py
import sys
import random
import os
import json
import time
import re
from _pytest.terminal import TerminalReporter


class TerminalColors:
    HEADER = '\033[95m'
    OKBLUE = '\033[94m'
    OKGREEN = '\033[92m'
    GRAY = '\033[1;30m'
    WARNING = '\033[93m'
    FAIL = '\033[91m'
    ENDC = '\033[0m'

    def disable(self):
        self.HEADER = ''
        self.OKBLUE = ''
        self.OKGREEN = ''
        self.WARNING = ''
        self.FAIL = ''
        self.ENDC = ''
        self.GRAY = ''


bcolors = TerminalColors()

class EtaLogger:
    def __init__(self):
        self.settings_path = os.path.expanduser("~/.pytest-sugar.json")
        try:
            self.collected = json.loads(
                open(self.settings_path).read()
            )
        except IOError:
            print "FUCK"
            self.collected = {}
        #print "-----------------"
        #print self.collected

    def collect(self, time, filename=None, hash=None):
        self.collected[filename] = time<commit_msg>left in a print statement.<commit_after># -*- coding: utf-8 -*-
"""
pytest_instafail
~~~~~~~~~~~~~~~~

py.test plugin to show failures instantly.

:copyright: see LICENSE for details
:license: BSD, see LICENSE for more details.
"""
import pytest
import pytest, py
import sys
import random
import os
import json
import time
import re
from _pytest.terminal import TerminalReporter


class TerminalColors:
    HEADER = '\033[95m'
    OKBLUE = '\033[94m'
    OKGREEN = '\033[92m'
    GRAY = '\033[1;30m'
    WARNING = '\033[93m'
    FAIL = '\033[91m'
    ENDC = '\033[0m'

    def disable(self):
        self.HEADER = ''
        self.OKBLUE = ''
        self.OKGREEN = ''
        self.WARNING = ''
        self.FAIL = ''
        self.ENDC = ''
        self.GRAY = ''


bcolors = TerminalColors()

class EtaLogger:
    def __init__(self):
        self.settings_path = os.path.expanduser("~/.pytest-sugar.json")
        try:
            self.collected = json.loads(
                open(self.settings_path).read()
            )
        except IOError:
            self.collected = {}
        #print "-----------------"
        #print self.collected

    def collect(self, time, filename=None, hash=None):
        self.collected[filename] = time
{'fraction_non_alphanumeric': 0.1483118971061093, 'fraction_numerical': 0.028938906752411574, 'mean_word_length': 2.150632911392405, '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': '3167329', 'n_tokens_mistral': 839, 'n_tokens_neox': 787, 'n_words': 191}