<commit_before>from box_score_player import BoxScorePlayer
from player_status import PlayerStatus


class AdvancedPlayerBoxScore:
    def __init__(self, player, seconds_played, offensive_rating, defensive_rating,
                 teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions,
                 offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions,
                 effective_field_goal_percentage, true_shooting_percentage, usage_percentage):

        assert isinstance(player, BoxScorePlayer)

        self.player = player
        self.seconds_played = seconds_played
        self.offensive_rating = offensive_rating
        self.defensive_rating = defensive_rating
        self.teammate_assist_percentage = teammate_assist_percentage
        self.assist_to_turnover_ratio = assist_to_turnover_ratio
        self.assists_per_100_possessions = assists_per_100_possessions
        self.offensive_rebound_percentage = offensive_rebound_percentage
        self.defensive_rebound_percentage = defensive_rebound_percentage
        self.turnovers_per_100_possessions = turnovers_per_100_possessions
        self.effective_field_goal_percentage = effective_field_goal_percentage
        self.true_shooting_percentage = true_shooting_percentage
        self.usage_percentage = usage_percentage

    @staticmethod
    def create(player_name, player_id, team_id, comment, seconds_played, offensive_rating, defensive_rating,
               teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions,
               offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions,
               effective_field_goal_percentage, true_shooting_percentage, usage_percentage):
        return AdvancedPlayerBoxScore(player=BoxScorePlayer.create(name=player_name, team_id=team_id, id=player_id,
                                                                   status=PlayerStatus.from_comment(comment=comment)),
                                      seconds_played=seconds_played, offensive_rating=offensive_rating,
                                      defensive_rating=defensive_rating, teammate_assist_percentage=teammate_assist_percentage,
                                      assist_to_turnover_ratio=assist_to_turnover_ratio, assists_per_100_possessions=assists_per_100_possessions,
                                      offensive_rebound_percentage=offensive_rebound_percentage, defensive_rebound_percentage=defensive_rebound_percentage,
                                      turnovers_per_100_possessions=turnovers_per_100_possessions, effective_field_goal_percentage=effective_field_goal_percentage,
                                      true_shooting_percentage=true_shooting_percentage, usage_percentage=usage_percentage)<commit_msg>update spacing<commit_after>from box_score_player import BoxScorePlayer
from player_status import PlayerStatus


class AdvancedPlayerBoxScore:
    def __init__(self, player, seconds_played, offensive_rating, defensive_rating,
                 teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions,
                 offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions,
                 effective_field_goal_percentage, true_shooting_percentage, usage_percentage):

        assert isinstance(player, BoxScorePlayer)

        self.player = player
        self.seconds_played = seconds_played
        self.offensive_rating = offensive_rating
        self.defensive_rating = defensive_rating
        self.teammate_assist_percentage = teammate_assist_percentage
        self.assist_to_turnover_ratio = assist_to_turnover_ratio
        self.assists_per_100_possessions = assists_per_100_possessions
        self.offensive_rebound_percentage = offensive_rebound_percentage
        self.defensive_rebound_percentage = defensive_rebound_percentage
        self.turnovers_per_100_possessions = turnovers_per_100_possessions
        self.effective_field_goal_percentage = effective_field_goal_percentage
        self.true_shooting_percentage = true_shooting_percentage
        self.usage_percentage = usage_percentage

    @staticmethod
    def create(player_name, player_id, team_id, comment, seconds_played, offensive_rating, defensive_rating,
               teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions,
               offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions,
               effective_field_goal_percentage, true_shooting_percentage, usage_percentage):
        return AdvancedPlayerBoxScore(player=BoxScorePlayer.create(name=player_name, team_id=team_id, id=player_id,
                                                                   status=PlayerStatus.from_comment(comment=comment)),
                                      seconds_played=seconds_played, offensive_rating=offensive_rating,
                                      defensive_rating=defensive_rating,
                                      teammate_assist_percentage=teammate_assist_percentage,
                                      assist_to_turnover_ratio=assist_to_turnover_ratio,
                                      assists_per_100_possessions=assists_per_100_possessions,
                                      offensive_rebound_percentage=offensive_rebound_percentage,
                                      defensive_rebound_percentage=defensive_rebound_percentage,
                                      turnovers_per_100_possessions=turnovers_per_100_possessions,
                                      effective_field_goal_percentage=effective_field_goal_percentage,
                                      true_shooting_percentage=true_shooting_percentage,
                                      usage_percentage=usage_percentage)
{'fraction_non_alphanumeric': 0.036980491942324, 'fraction_numerical': 0.012213740458015267, 'mean_word_length': 2.983783783783784, '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': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2223317', 'n_tokens_mistral': 1615, 'n_tokens_neox': 1505, 'n_words': 178}