<commit_before>from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe


class InputMask(forms.TextInput):
    def render(self, name, value, attrs=None):
        if hasattr(self, 'mask'):
            class_ = mark_safe('mask %s' % (self.mask,))

            if attrs is None:
                attrs = {'class': class_}
            elif 'class' not in attrs:
                attrs['class'] = class_
            else:
                attrs['class'] += ' ' + class_

        return super(InputMask, self).render(name, value, attrs=attrs)

    class Media:
        js = (settings.MEDIA_URL + 'js/jquery.metadata.js',
              settings.MEDIA_URL + 'js/jquery.meio.mask.min.js',
              settings.MEDIA_URL + 'js/text_input_mask.js',)
<commit_msg>Changes MEDIA_URL (old way) to STATIC_URL<commit_after>from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe


class InputMask(forms.TextInput):
    def render(self, name, value, attrs=None):
        if hasattr(self, 'mask'):
            class_ = mark_safe('mask %s' % (self.mask,))

            if attrs is None:
                attrs = {'class': class_}
            elif 'class' not in attrs:
                attrs['class'] = class_
            else:
                attrs['class'] += ' ' + class_

        return super(InputMask, self).render(name, value, attrs=attrs)

    class Media:
        js = (settings.STATIC_URL + 'js/jquery.metadata.js',
              settings.STATIC_URL + 'js/jquery.meio.mask.min.js',
              settings.STATIC_URL + 'js/text_input_mask.js',)

{'fraction_non_alphanumeric': 0.12046711739397664, 'fraction_numerical': 0.0, 'mean_word_length': 2.2301587301587302, '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': '5792425', 'n_tokens_mistral': 495, 'n_tokens_neox': 484, 'n_words': 119}