From 843fdadfc477f5a452566544a26c906f38d3cbc9 Mon Sep 17 00:00:00 2001 From: fono09 Date: Sun, 6 Mar 2022 01:04:01 +0900 Subject: [PATCH] =?UTF-8?q?typo=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/omikuji.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/library/omikuji.py b/library/omikuji.py index 910df2ae37..deee8d1e0d 100644 --- a/library/omikuji.py +++ b/library/omikuji.py @@ -11,19 +11,17 @@ from random import choices -class AbstractOmikujiResults(ABC) +class AbstractOmikujiResults(ABC): - -""" + """ おみくじの結果一覧の抽象クラス """ -pass + pass -""" -Enumを継承している -""" + +# Enumを継承している AbstractOmikujiResults.register(Enum) @@ -67,15 +65,12 @@ def draw(self): """ return choices( population=self.entries, - weights=map(lambda entry: entry.rate, self.entries) + weights=map(lambda entry: entry.rate, self.entries), k=1 )[0] -""" -以下おみくじの設定 -""" - +# 以下おみくじの設定 class OmikujiResults(AbstractOmikujiResults): DaiKichi = auto()