<commit_before># -*- coding: utf-8 -*-
from mahjong.agari import Agari
from mahjong.constants import EAST, SOUTH, WEST, NORTH, CHUN, HATSU, HAKU
from mahjong.hand_calculating.divider import HandDivider
from mahjong.hand_calculating.fu import HandFuCalculator
from mahjong.hand_calculating.scores import ScoresCalculator
from mahjong.hand_calculating.yaku_config import YakuConfig
from mahjong.meld import Meld
from mahjong.tile import TilesConverter
from mahjong.utils import is_chi, is_pon, plus_dora, is_aka_dora


class HandResponse(object):
    cost = None
    han = None
    fu = None
    fu_details = None
    yaku = None
    error = None

    def __init__(self, cost=None, han=None, fu=None, yaku=None, error=None, fu_details=None):
        self.cost = cost
        self.han = han
        self.fu = fu
        self.fu_details = fu_details
        self.yaku = yaku
        self.yaku = sorted(yaku, key=lambda x: x.yaku_id)
        self.error = error


class FinishedHand(object):
    config = YakuConfig()

    def estimate_hand_value(self,
                            tiles,
                            win_tile,
                            is_tsumo=False,
                            is_riichi=False,
                            is_dealer=False,
                            is_ippatsu=False,<commit_msg>Don't sort empty yaku list<commit_after># -*- coding: utf-8 -*-
from mahjong.agari import Agari
from mahjong.constants import EAST, SOUTH, WEST, NORTH, CHUN, HATSU, HAKU
from mahjong.hand_calculating.divider import HandDivider
from mahjong.hand_calculating.fu import HandFuCalculator
from mahjong.hand_calculating.scores import ScoresCalculator
from mahjong.hand_calculating.yaku_config import YakuConfig
from mahjong.meld import Meld
from mahjong.tile import TilesConverter
from mahjong.utils import is_chi, is_pon, plus_dora, is_aka_dora


class HandResponse(object):
    cost = None
    han = None
    fu = None
    fu_details = None
    yaku = None
    error = None

    def __init__(self, cost=None, han=None, fu=None, yaku=None, error=None, fu_details=None):
        self.cost = cost
        self.han = han
        self.fu = fu
        self.fu_details = fu_details
        if yaku:
            self.yaku = sorted(yaku, key=lambda x: x.yaku_id)
        self.error = error


class FinishedHand(object):
    config = YakuConfig()

    def estimate_hand_value(self,
                            tiles,
                            win_tile,
                            is_tsumo=False,
                            is_riichi=False,
                            is_dealer=False,
                            is_ippatsu=False,
{'fraction_non_alphanumeric': 0.07297605473204105, 'fraction_numerical': 0.0007601672367920942, 'mean_word_length': 2.213675213675214, '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': '2954162', 'n_tokens_mistral': 865, 'n_tokens_neox': 821, 'n_words': 201}