<commit_before>from io import BytesIO

from django.core.exceptions import ValidationError
from django.core.validators import BaseValidator
from django.utils.translation import ugettext_lazy as _
from PIL import Image


class BaseSizeValidator(BaseValidator):
    """Base validator that validates the size of an image."""

    def compare(self, x):
        return True

    def __init__(self, width, height):
        self.limit_value = width, height

    def __call__(self, value):
        cleaned = self.clean(value)
        if self.compare(cleaned, self.limit_value):
            params = {
                'width': self.limit_value[0],<commit_msg>Remove django DeprecationWarning<commit_after>from io import BytesIO

from django.core.exceptions import ValidationError
from django.core.validators import BaseValidator
from django.utils.translation import gettext_lazy as _
from PIL import Image


class BaseSizeValidator(BaseValidator):
    """Base validator that validates the size of an image."""

    def compare(self, x):
        return True

    def __init__(self, width, height):
        self.limit_value = width, height

    def __call__(self, value):
        cleaned = self.clean(value)
        if self.compare(cleaned, self.limit_value):
            params = {
                'width': self.limit_value[0],
{'fraction_non_alphanumeric': 0.08206686930091185, 'fraction_numerical': 0.001519756838905775, 'mean_word_length': 3.262135922330097, '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': '2322371', 'n_tokens_mistral': 365, 'n_tokens_neox': 354, 'n_words': 111}