<commit_before>from datetime import datetime
from sanic.response import json
from sanic.log import log

# Validates request data for a put or a post
def validation(func):
    def wrapped(self, request, *args, **kwargs):
        model = self.model
        shortcuts = model.shortcuts

        fields = shortcuts.fields
        field_names = shortcuts.get_field_names().sort()
        primary_key = shortcuts.primary_key
        required_fields = shortcuts.required_fields
        response_messages = self.model.crud_config.response_messages

        # min/max value size for fields
        field_default_size = {
            'int': {'min': -2147483647, 'max': 2147483647},
            'bigint': {'min': -9223372036854775808, 'max': 9223372036854775807}
        }

        # min/max length for fields
        field_default_length = {
            'string': {'min': 0, 'max': 255}
        }

        # verify the request data is valid JSON
        try:<commit_msg>fixing tests<commit_after>from datetime import datetime
from sanic.response import json
from sanic.log import log

# Validates request data for a put or a post
def validation(func):
    def wrapped(self, request, *args, **kwargs):
        model = self.model
        shortcuts = model.shortcuts

        fields = shortcuts.fields
        field_names = shortcuts.get_field_names()
        primary_key = shortcuts.primary_key
        required_fields = shortcuts.required_fields
        response_messages = self.model.crud_config.response_messages

        # min/max value size for fields
        field_default_size = {
            'int': {'min': -2147483647, 'max': 2147483647},
            'bigint': {'min': -9223372036854775808, 'max': 9223372036854775807}
        }

        # min/max length for fields
        field_default_length = {
            'string': {'min': 0, 'max': 255}
        }

        # verify the request data is valid JSON
        try:
{'fraction_non_alphanumeric': 0.09257322175732217, 'fraction_numerical': 0.06485355648535565, 'mean_word_length': 2.497257769652651, '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': '2319754', 'n_tokens_mistral': 641, 'n_tokens_neox': 548, 'n_words': 152}