<commit_before>import six

from .html_elements import InputCollection
from .html_elements import Input
from ..meta_elements import MetaHTMLElement


@six.add_metaclass(MetaHTMLElement)
class Radio(Input):
    @property
    def is_set(self):
        """
        Returns True if the element is selected
        :rtype: bool
        """
        return self._element_call(lambda: self.el.selected)

    def set(self, value=True):
        """ Selects the radio input """
        if not self.is_set:
            self.click()


@six.add_metaclass(MetaHTMLElement)
class RadioCollection(InputCollection):
    # private

    @property
    def _element_class(self):
        return Radio<commit_msg>alias Radio#set as Radio#select<commit_after>import six

from .html_elements import InputCollection
from .html_elements import Input
from ..meta_elements import MetaHTMLElement


@six.add_metaclass(MetaHTMLElement)
class Radio(Input):
    @property
    def is_set(self):
        """
        Returns True if the element is selected
        :rtype: bool
        """
        return self._element_call(lambda: self.el.selected)

    is_selected = is_set

    def set(self):
        """ Selects the radio input """
        if not self.is_set:
            self.click()

    select = set


@six.add_metaclass(MetaHTMLElement)
class RadioCollection(InputCollection):
    # private

    @property
    def _element_class(self):
        return Radio
{'fraction_non_alphanumeric': 0.08555399719495091, 'fraction_numerical': 0.0, 'mean_word_length': 2.888283378746594, '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': '4521355', 'n_tokens_mistral': 418, 'n_tokens_neox': 413, 'n_words': 109}