<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from . import forms, utils
from dateutil.relativedelta import relativedelta
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from django.utils.six import with_metaclass
from isodate.isoerror import ISO8601Error
import isodate


try:
    from south.modelsinspector import add_introspection_rules
except ImportError:
    add_introspection_rules = None


class ISO8601DurationField(with_metaclass(models.SubfieldBase, models.Field)):
    """Store and retrieve ISO 8601 formatted durations.

    """

    description = _("A duration of time (ISO 8601 format)")

    __metaclass__ = models.SubfieldBase

    default_error_messages = {
        'invalid': _("This value must be in ISO 8601 Duration format."),<commit_msg>durationfield | models - removed python2 syntax __metaclass__.<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from . import forms, utils
from dateutil.relativedelta import relativedelta
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from django.utils.six import with_metaclass
from isodate.isoerror import ISO8601Error
import isodate


try:
    from south.modelsinspector import add_introspection_rules
except ImportError:
    add_introspection_rules = None


class ISO8601DurationField(with_metaclass(models.SubfieldBase, models.Field)):
    """Store and retrieve ISO 8601 formatted durations.

    """

    description = _("A duration of time (ISO 8601 format)")

    default_error_messages = {
        'invalid': _("This value must be in ISO 8601 Duration format."),
{'fraction_non_alphanumeric': 0.07047724750277469, 'fraction_numerical': 0.02386237513873474, 'mean_word_length': 4.872964169381108, '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': '6588979', 'n_tokens_mistral': 550, 'n_tokens_neox': 502, 'n_words': 160}