<commit_before>from rest_framework.serializers import BaseSerializer, ValidationError

from marshmallow import Schema as MarshmallowSchema
from marshmallow import fields  # noqa

__version__ = '2.0.0'

_schema_kwargs = (
    'only', 'exclude'
)


class Schema(BaseSerializer, MarshmallowSchema):
    def __init__(self, *args, **kwargs):
        schema_kwargs = {
            'many': kwargs.get('many', False)
        }
        # Remove any kwargs that are only valid for marshmallow schemas<commit_msg>Fixed issue#12 Nested field throwing errors Added dump_only and load_only to _schema_kwargs in __init__.py. Accomodating marshmallow changes in version 2.0.0<commit_after>from rest_framework.serializers import BaseSerializer, ValidationError

from marshmallow import Schema as MarshmallowSchema
from marshmallow import fields  # noqa

__version__ = '2.0.0'

_schema_kwargs = (
    'only', 'exclude', 'dump_only', 'load_only'
)


class Schema(BaseSerializer, MarshmallowSchema):
    def __init__(self, *args, **kwargs):
        schema_kwargs = {
            'many': kwargs.get('many', False)
        }
        # Remove any kwargs that are only valid for marshmallow schemas
{'fraction_non_alphanumeric': 0.08432708688245315, 'fraction_numerical': 0.009369676320272573, 'mean_word_length': 4.021367521367521, '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': '1978600', 'n_tokens_mistral': 357, 'n_tokens_neox': 339, 'n_words': 104}