<commit_before>from app import app
from flask import jsonify
from werkzeug.exceptions import HTTPException, default_exceptions


def json_error(error):
    response = jsonify(message = str(error))
    print(str(error))
    response.status_code = error.code if isinstance(error, HTTPException) else 500<commit_msg>Optimize imports<commit_after>from app import app
from flask import jsonify
from werkzeug.exceptions import HTTPException
from werkzeug.exceptions import default_exceptions


def json_error(error):
    response = jsonify(message = str(error))
    response.status_code = error.code if isinstance(error, HTTPException) else 500
{'fraction_non_alphanumeric': 0.06896551724137931, 'fraction_numerical': 0.009404388714733543, 'mean_word_length': 6.021978021978022, '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': '7631081', 'n_tokens_mistral': 184, 'n_tokens_neox': 175, 'n_words': 54}