mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +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:
@ -270,24 +270,23 @@ def multi_a_star(start: TPos, goal: TPos, n_heuristic: int):
|
||||
back_pointer,
|
||||
)
|
||||
close_list_inad.append(get_s)
|
||||
elif g_function[goal] <= open_list[0].minkey():
|
||||
if g_function[goal] < float("inf"):
|
||||
do_something(back_pointer, goal, start)
|
||||
else:
|
||||
if g_function[goal] <= open_list[0].minkey():
|
||||
if g_function[goal] < float("inf"):
|
||||
do_something(back_pointer, goal, start)
|
||||
else:
|
||||
get_s = open_list[0].top_show()
|
||||
visited.add(get_s)
|
||||
expand_state(
|
||||
get_s,
|
||||
0,
|
||||
visited,
|
||||
g_function,
|
||||
close_list_anchor,
|
||||
close_list_inad,
|
||||
open_list,
|
||||
back_pointer,
|
||||
)
|
||||
close_list_anchor.append(get_s)
|
||||
get_s = open_list[0].top_show()
|
||||
visited.add(get_s)
|
||||
expand_state(
|
||||
get_s,
|
||||
0,
|
||||
visited,
|
||||
g_function,
|
||||
close_list_anchor,
|
||||
close_list_inad,
|
||||
open_list,
|
||||
back_pointer,
|
||||
)
|
||||
close_list_anchor.append(get_s)
|
||||
print("No path found to goal")
|
||||
print()
|
||||
for i in range(n - 1, -1, -1):
|
||||
|
Reference in New Issue
Block a user