Skip to content

Commit e61cb9f

Browse files
committed
format with black
1 parent cc8c990 commit e61cb9f

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

main.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import os
55

6+
67
def main():
78
args_parser = argparse.ArgumentParser(
89
description="Start parsing Domain and Problem files with PDDL.jl using Python"
@@ -12,19 +13,23 @@ def main():
1213
args_parser.add_argument("problem", type=str, help="PDDL problem file")
1314
args_parser.add_argument("-v", "--verbose", help="Increases the output's verbosity")
1415
args = args_parser.parse_args()
15-
logging.basicConfig(filename='logs/main.log', format='%(levelname)s:%(message)s', filemode='w', level=logging.INFO) # Creates the log file
16+
logging.basicConfig(
17+
filename="logs/main.log",
18+
format="%(levelname)s:%(message)s",
19+
filemode="w",
20+
level=logging.INFO,
21+
) # Creates the log file
1622
apla_tbx = parser.AutomatedPlanner(args.domain, args.problem)
1723
logging.info("Starting the tool")
1824
path, time = apla_tbx.depth_first_search(time_it=True)
1925
logging.info(apla_tbx.get_actions_from_path(path))
2026
logging.info("Computation time: %.2f seconds" % time)
2127
logging.info("Tool finished")
22-
#Output the log (to show something in the output screen)
28+
# Output the log (to show something in the output screen)
2329
logfile = open("logs/main.log", "r")
2430
print(logfile.read())
2531
logfile.close()
2632

2733

28-
2934
if __name__ == "__main__":
3035
main()

src/bfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .node import Node
22
import logging
33

4+
45
class BreadthFirstSearch:
56
def __init__(self, automated_planner):
67
self.visited = []

src/dfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .node import Node
22
import logging
33

4+
45
class DepthFirstSearch:
56
def __init__(self, automated_planner):
67
self.visited = []

0 commit comments

Comments
 (0)