fix: linter warning PLR2004

This commit is contained in:
283375 2024-08-06 12:32:43 +08:00
parent dbb5d680af
commit abc535c59f
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk
2 changed files with 3 additions and 2 deletions

View File

@ -44,9 +44,9 @@ class PlayResultCalculators:
if score < 0:
raise ValueError("score cannot be negative")
if score >= 10000000:
if score >= ScoreLowerLimits.PM:
return Decimal(2)
if score >= 9800000:
if score >= ScoreLowerLimits.EX:
return Decimal(1) + (Decimal(score - 9800000) / 200000)
return Decimal(score - 9500000) / 300000

View File

@ -3,6 +3,7 @@ from dataclasses import dataclass
@dataclass(frozen=True)
class ScoreLowerLimits:
PM = 10000000
EX_PLUS = 9900000
EX = 9800000
AA = 9500000