mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-08 03:54:26 +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:
@ -274,14 +274,13 @@ def convex_hull_bf(points: list[Point]) -> list[Point]:
|
||||
points_left_of_ij = True
|
||||
elif det_k < 0:
|
||||
points_right_of_ij = True
|
||||
else:
|
||||
# point[i], point[j], point[k] all lie on a straight line
|
||||
# if point[k] is to the left of point[i] or it's to the
|
||||
# right of point[j], then point[i], point[j] cannot be
|
||||
# part of the convex hull of A
|
||||
if points[k] < points[i] or points[k] > points[j]:
|
||||
ij_part_of_convex_hull = False
|
||||
break
|
||||
# point[i], point[j], point[k] all lie on a straight line
|
||||
# if point[k] is to the left of point[i] or it's to the
|
||||
# right of point[j], then point[i], point[j] cannot be
|
||||
# part of the convex hull of A
|
||||
elif points[k] < points[i] or points[k] > points[j]:
|
||||
ij_part_of_convex_hull = False
|
||||
break
|
||||
|
||||
if points_left_of_ij and points_right_of_ij:
|
||||
ij_part_of_convex_hull = False
|
||||
|
Reference in New Issue
Block a user