<commit_before>from typing import NamedTuple

from lexos.receivers.base_receiver import BaseReceiver


class SimilarityOption(NamedTuple):
    """The typed tuple to implement similarity option."""
    # This is the id of the file to be compared
    comp_file_id: int


class SimilarityReceiver(BaseReceiver):

    def __init__(self):
        """The Receiver to get all the similarity options"""
        super().__init__()

    def options_from_front_end(self) -> SimilarityOption:
        """Get the similarity option from front end

        :return: a similarity option object that holds all the options
        """
        comp_file_id = int(self._front_end_data['uploadname'])
        similarity_option = SimilarityOption(comp_file_id=comp_file_id)

        return similarity_option<commit_msg>Remove redundant code<commit_after>from typing import NamedTuple
from lexos.receivers.base_receiver import BaseReceiver


class SimilarityOption(NamedTuple):
    """The typed tuple to implement similarity option."""
    # This is the id of the file to be compared
    comp_file_id: int


class SimilarityReceiver(BaseReceiver):

    def __init__(self):
        """The Receiver to get all the similarity options"""
        super().__init__()

    def options_from_front_end(self) -> SimilarityOption:
        """Get the similarity option from front end

        :return: a similarity option object that holds all the options
        """
        comp_file_id = int(self._front_end_data['uploadname'])

        return SimilarityOption(comp_file_id=comp_file_id)
{'fraction_non_alphanumeric': 0.0752411575562701, 'fraction_numerical': 0.0, 'mean_word_length': 3.6726726726726726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5435440', 'n_tokens_mistral': 433, 'n_tokens_neox': 407, 'n_words': 135}