From f3858a73fa79eafc773eb2e6c4b579134e5c0720 Mon Sep 17 00:00:00 2001 From: Apricot-S Date: Mon, 11 May 2026 00:15:03 +0900 Subject: [PATCH] fix: Create a new `HandConfig` instance when `config=None` in `HandCalculator.estimate_hand_value` --- mahjong/hand_calculating/hand.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mahjong/hand_calculating/hand.py b/mahjong/hand_calculating/hand.py index e7a9166..e5582b4 100644 --- a/mahjong/hand_calculating/hand.py +++ b/mahjong/hand_calculating/hand.py @@ -25,8 +25,6 @@ class _CalculatedHand(TypedDict): # suit bitmask: sou=1, pin=2, man=4 _ALL_SUITS_MASK = 7 -_DEFAULT_CONFIG = HandConfig() - class HandCalculator: """ @@ -190,7 +188,7 @@ def estimate_hand_value( if not ura_dora_indicators: ura_dora_indicators = [] - config = config or _DEFAULT_CONFIG + config = config or HandConfig() hand_yaku = [] scores_calculator = scores_calculator_factory()