Skip to content

Commit d39d17b

Browse files
guilyxactions-user
authored andcommitted
Apply formatting changes
1 parent 1f40c6a commit d39d17b

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

jupyddl/data_analyst.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ def comparative_astar_heuristic_plot(
367367
times_y.append(data[node_opened])
368368

369369
ax.plot(
370-
nodes_sorted, times_y, "-o", label=h,
370+
nodes_sorted,
371+
times_y,
372+
"-o",
373+
label=h,
371374
)
372375

373376
plt.title("A* heuristics complexity comparison")
@@ -439,7 +442,10 @@ def comparative_data_plot(
439442
for node_opened in nodes_sorted:
440443
times_y.append(data[node_opened])
441444
ax.plot(
442-
nodes_sorted, times_y, "-o", label=planner,
445+
nodes_sorted,
446+
times_y,
447+
"-o",
448+
label=planner,
443449
)
444450
plt.title("Planners complexity comparison")
445451
plt.legend(loc="upper left")

jupyddl/heuristics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ def compute(self, state):
7878
return self.heuristic_keys[self.current_h](costs)
7979

8080
for ax in self.cache.axioms:
81-
fact_costs = self.automated_planner.pddl.compute_costs_one_step_derivation(
82-
facts, fact_costs, ax, self.current_h
81+
fact_costs = (
82+
self.automated_planner.pddl.compute_costs_one_step_derivation(
83+
facts, fact_costs, ax, self.current_h
84+
)
8385
)
8486

8587
actions = self.automated_planner.available_actions(state)

tests/test_automated_planner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_state_assertion():
4545
)
4646
assert not apla.satisfies(apla.problem.goal, apla.initial_state)
4747

48+
4849
def test_bfs():
4950
apla = AutomatedPlanner(
5051
"pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl"
@@ -54,6 +55,7 @@ def test_bfs():
5455
plan_state = apla.get_state_def_from_path(path)
5556
assert plan and plan_state
5657

58+
5759
def test_dfs():
5860
apla = AutomatedPlanner(
5961
"pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl"
@@ -63,6 +65,7 @@ def test_dfs():
6365
plan_state = apla.get_state_def_from_path(path)
6466
assert plan and plan_state
6567

68+
6669
def test_dij():
6770
apla = AutomatedPlanner(
6871
"pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl"

tests/test_basic_search.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,3 @@ def test_search_astar_basic_no_path():
8787

8888
def test_zero_heuristic():
8989
assert zero_heuristic() == 0
90-

0 commit comments

Comments
 (0)