<commit_before>from rest_framework import serializers
from greta.models import Repository
from competition.models import Team

from .models import TeamClient, TeamSubmission


class TeamSerializer(serializers.ModelSerializer):

    class Meta:
        model = Team
        fields = ('id', 'name', 'slug', 'eligible_to_win')


class RepoSerializer(serializers.ModelSerializer):

    class Meta:
        model = Repository
        fields = ('name', 'description', 'forked_from',
                  'path', 'is_ready')

    forked_from = serializers.RelatedField(read_only=True)
    path = serializers.SerializerMethodField('get_path')
    is_ready = serializers.SerializerMethodField('get_is_ready')

    def get_path(self, repo):
        return repo.path

    def get_is_ready(self, repo):
        return repo.is_ready()


class TeamSubmissionSerializer(serializers.ModelSerializer):

    class Meta:
        model = TeamSubmission
        fields = ('name', 'commit')


class TeamClientSerializer(serializers.ModelSerializer):

    class Meta:
        model = TeamClient
        fields = ('team', 'repository', 'tag', 'language')

    team = TeamSerializer()
    repository = RepoSerializer()
    tag = serializers.SerializerMethodField('get_tag')
    language = serializers.SerializerMethodField('get_language')

    def get_tag(self, teamclient):
        try:
            latest_sub= teamclient.submissions.latest()
            return TeamSubmissionSerializer(latest_sub).data
        except TeamSubmission.DoesNotExist:
            return None
<commit_msg>Remove redundant serializer arguments<commit_after>from rest_framework import serializers
from greta.models import Repository
from competition.models import Team

from .models import TeamClient, TeamSubmission


class TeamSerializer(serializers.ModelSerializer):

    class Meta:
        model = Team
        fields = ('id', 'name', 'slug', 'eligible_to_win')


class RepoSerializer(serializers.ModelSerializer):

    class Meta:
        model = Repository
        fields = ('name', 'description', 'forked_from',
                  'path', 'is_ready')

    forked_from = serializers.RelatedField(read_only=True)
    path = serializers.SerializerMethodField(read_only=True)
    is_ready = serializers.SerializerMethodField(read_only=True)

    def get_path(self, repo):
        return repo.path

    def get_is_ready(self, repo):
        return repo.is_ready()


class TeamSubmissionSerializer(serializers.ModelSerializer):

    class Meta:
        model = TeamSubmission
        fields = ('name', 'commit')


class TeamClientSerializer(serializers.ModelSerializer):

    class Meta:
        model = TeamClient
        fields = ('team', 'repository', 'tag', 'language')

    team = TeamSerializer()
    repository = RepoSerializer()
    tag = serializers.SerializerMethodField(read_only=True)
    language = serializers.SerializerMethodField(read_only=True)

    def get_tag(self, teamclient):
        try:
            latest_sub= teamclient.submissions.latest()
            return TeamSubmissionSerializer(latest_sub).data
        except TeamSubmission.DoesNotExist:
            return None

{'fraction_non_alphanumeric': 0.09151572926596759, 'fraction_numerical': 0.0, 'mean_word_length': 3.4338028169014083, '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': '4878488', 'n_tokens_mistral': 865, 'n_tokens_neox': 828, 'n_words': 195}