mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule * [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:
@ -113,11 +113,10 @@ def data_safety_checker(list_vote: list, actual_result: float) -> bool:
|
||||
for i in list_vote:
|
||||
if i > actual_result:
|
||||
safe = not_safe + 1
|
||||
elif abs(abs(i) - abs(actual_result)) <= 0.1:
|
||||
safe += 1
|
||||
else:
|
||||
if abs(abs(i) - abs(actual_result)) <= 0.1:
|
||||
safe += 1
|
||||
else:
|
||||
not_safe += 1
|
||||
not_safe += 1
|
||||
return safe > not_safe
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user