<commit_before>"""
    harpseal.web.classes
    ~~~~~~~~~~~~~~~~~~~~

"""
import asyncio

from aiohttp import web

__all__ = ['Response']

class Response(web.StreamResponse):
    def __init__(self, body=None, status=200, reason=None, headers=None):
        super().__init__(status=status, reason=reason, headers=headers)

        if body is None:
            raise ValueError("the argument 'body' is positional argument.")
        self.headers['Content-Type'] = self.content_type = 'application/json'
        self.body = body

    @property
    def body(self):
        return self._body
<commit_msg>Add: 'ok' variable to the dict<commit_after>"""
    harpseal.web.classes
    ~~~~~~~~~~~~~~~~~~~~

"""
import asyncio
import json

from aiohttp import web

__all__ = ['Response']

class Response(web.StreamResponse):
    def __init__(self, body=None, status=200, reason=None, headers=None):
        super().__init__(status=status, reason=reason, headers=headers)

        if body is None:
            raise ValueError("the argument 'body' is positional argument.")
        elif 'ok' not in body:
            body['ok'] = True
        self.headers['Content-Type'] = self.content_type = 'application/json'
        self.body = body

    @property
    def body(self):
        return self._body

{'fraction_non_alphanumeric': 0.14518633540372672, 'fraction_numerical': 0.004658385093167702, 'mean_word_length': 3.1580645161290324, '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': '6503597', 'n_tokens_mistral': 376, 'n_tokens_neox': 367, 'n_words': 98}