<commit_before># -*- coding: utf-8 -*-

import marshmallow
from marshmallow import fields

from tuxedo_mask import models


class BaseView(marshmallow.Schema):

    class Meta:
        dateformat = 'iso'
        ordered = True

    created_at = fields.DateTime(dump_only=True)
    created_by = fields.String(dump_only=True)
    updated_at = fields.DateTime(dump_only=True)
    updated_by = fields.String(dump_only=True)

    @marshmallow.post_load
    def _deserialize(self, data):
        return models.Base(**data)
<commit_msg>ME-441: Added _model class attribute<commit_after># -*- coding: utf-8 -*-

import marshmallow
from marshmallow import fields

from tuxedo_mask import models


class BaseView(marshmallow.Schema):

    _model = models.Base

    class Meta:
        dateformat = 'iso'
        ordered = True

    created_at = fields.DateTime(dump_only=True)
    created_by = fields.String(dump_only=True)
    updated_at = fields.DateTime(dump_only=True)
    updated_by = fields.String(dump_only=True)

    @marshmallow.post_load
    def _deserialize(self, data):
        return self._model(**data)

{'fraction_non_alphanumeric': 0.0975609756097561, 'fraction_numerical': 0.004516711833785004, 'mean_word_length': 3.5596707818930042, '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': '7224720', 'n_tokens_mistral': 365, 'n_tokens_neox': 348, 'n_words': 76}