<commit_before>from wtforms.fields import SelectField
from wtforms.validators import ValidationError
from wtforms.widgets import Select
from wtforms.widgets.core import HTMLString, html_params, escape


__all__ = ('GroupSelectField', 'GroupSelectWidget')


class GroupSelect(Select):
    """
    Add support of choices with ``optgroup`` to the ``Select`` widget.
    """
    @classmethod
    def render_option(cls, value, label, mixed):
        """
        Render option as HTML tag, but not forget to wrap options into
        ``optgroup`` tag if ``label`` var is ``list`` or ``tuple``.
        """
        if isinstance(label, (list, tuple)):
            children = []

            for item_value, item_label in label:<commit_msg>forms.select: remove GroupSelectWidget<commit_after>from wtforms.fields import SelectField
from wtforms.validators import ValidationError
from wtforms.widgets import Select
from wtforms.widgets.core import HTMLString, html_params, escape


__all__ = ('GroupSelectField')


class GroupSelect(Select):
    """
    Add support of choices with ``optgroup`` to the ``Select`` widget.
    """
    @classmethod
    def render_option(cls, value, label, mixed):
        """
        Render option as HTML tag, but not forget to wrap options into
        ``optgroup`` tag if ``label`` var is ``list`` or ``tuple``.
        """
        if isinstance(label, (list, tuple)):
            children = []

            for item_value, item_label in label:
{'fraction_non_alphanumeric': 0.10694822888283378, 'fraction_numerical': 0.0, 'mean_word_length': 3.23342939481268, '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': '1987988', 'n_tokens_mistral': 405, 'n_tokens_neox': 384, 'n_words': 140}