<commit_before># -*- coding: utf-8 -*-
import unittest
import pep8
from nose.tools import assert_true
from pylint import lint
from pylint.reporters.text import TextReporter


class CustomReport(pep8.StandardReport):
    results = []

    def get_file_results(self):
        if self._deferred_print:
            self._deferred_print.sort()
            for line_number, offset, code, text, _ in self._deferred_print:
                self.results.append({
                    'path': self.filename,
                    'row': self.line_offset + line_number,
                    'col': offset + 1,
                    'code': code,
                    'text': text,
                })
        return self.file_errors


class WritableObject(object):
    def __init__(self):
        self.content = []

    def write(self, st):
        if st == '\n':
            return
        if '*****' in st:
            return
        self.content.append(st)
<commit_msg>Zerando resultados a cada uso<commit_after># -*- coding: utf-8 -*-
import unittest
import pep8
from nose.tools import assert_true
from pylint import lint
from pylint.reporters.text import TextReporter


class CustomReport(pep8.StandardReport):
    results = []

    def __init__(self, options):
        super(CustomReport, self).__init__(options)
        self.results = []

    def get_file_results(self):
        if self._deferred_print:
            self._deferred_print.sort()
            for line_number, offset, code, text, _ in self._deferred_print:
                self.results.append({
                    'path': self.filename,
                    'row': self.line_offset + line_number,
                    'col': offset + 1,
                    'code': code,
                    'text': text,
                })
        return self.file_errors


class WritableObject(object):
    def __init__(self):
        self.content = []

    def write(self, st):
        if st == '\n':
            return
        if '*****' in st:
            return
        self.content.append(st)

{'fraction_non_alphanumeric': 0.10531496062992125, 'fraction_numerical': 0.003937007874015748, 'mean_word_length': 1.7622282608695652, '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': '5429747', 'n_tokens_mistral': 590, 'n_tokens_neox': 557, 'n_words': 142}