Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 5, 2024
1 parent edf70d2 commit 001c3cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions aiosu/utils/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def calculate(self, score: Score) -> OsuPerformanceAttributes:

if score.max_combo < full_combo_threshold:
effective_miss_count = full_combo_threshold / max(

Check failure on line 110 in aiosu/utils/performance.py

View workflow job for this annotation

GitHub Actions / mypy

Incompatible types in assignment (expression has type "float", variable has type "int") [assignment]
1, score.max_combo,
1,
score.max_combo,
)

effective_miss_count = min(
Expand All @@ -122,13 +123,16 @@ def calculate(self, score: Score) -> OsuPerformanceAttributes:

if score.max_combo < full_combo_threshold:
effective_miss_count = full_combo_threshold / max(

Check failure on line 125 in aiosu/utils/performance.py

View workflow job for this annotation

GitHub Actions / mypy

Incompatible types in assignment (expression has type "Union[float, Any]", variable has type "int") [assignment]
1, score.max_combo,
1,
score.max_combo,
)

effective_miss_count = min(effective_miss_count, score.statistics.count_large_tick_miss + score.statistics.count_miss) # type: ignore

effective_miss_count = clamp(

Check failure on line 132 in aiosu/utils/performance.py

View workflow job for this annotation

GitHub Actions / mypy

Incompatible types in assignment (expression has type "float", variable has type "int") [assignment]
effective_miss_count, score.statistics.count_miss, total_hits,
effective_miss_count,
score.statistics.count_miss,
total_hits,
)

multiplier = OSU_BASE_MULTIPLIER
Expand Down Expand Up @@ -445,7 +449,9 @@ def _get_combo_scaling_factor(self, score: Score) -> float:
)

def _calculate_miss_penalty(
self, effective_miss_count: float, difficult_strain_count: float,
self,
effective_miss_count: float,
difficult_strain_count: float,
) -> float:
return 0.96 / (
(effective_miss_count / (4 * pow(math.log(difficult_strain_count), 0.94)))
Expand Down

0 comments on commit 001c3cc

Please sign in to comment.