mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -88,9 +88,11 @@ def solution(max_proportion: float = 1 / 12345) -> int:
|
||||
total_partitions += 1
|
||||
if check_partition_perfect(partition_candidate):
|
||||
perfect_partitions += 1
|
||||
if perfect_partitions > 0:
|
||||
if perfect_partitions / total_partitions < max_proportion:
|
||||
return int(partition_candidate)
|
||||
if (
|
||||
perfect_partitions > 0
|
||||
and perfect_partitions / total_partitions < max_proportion
|
||||
):
|
||||
return int(partition_candidate)
|
||||
integer += 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user