Skip to content

Commit ffaa128

Browse files
committed
fixed app_data.json path, added requirements.txt
1 parent 0eb6515 commit ffaa128

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

TODOlist.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
class TODOlistApplication():
77
def __init__(self) -> None:
88
self.app = QApplication(sys.argv)
9-
self.app.setStyle("Fusion")
10-
9+
# self.app.setStyle("Fusion")
1110

1211
self.model = Model()
1312
self.view = Window(self.model)

model/model.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def __init__(self) -> None:
2222
self.write_to_app_data()
2323

2424
def retrieve_app_data(self):
25-
if isfile('app_data.json'):
26-
with open('app_data.json', 'r') as json_file:
25+
if isfile(join(self.script_directory, "app_data.json")):
26+
with open(join(self.script_directory, "app_data.json"), 'r') as json_file:
2727
json_data = json.load(json_file)
2828
todolist_names = self.get_list_names()
2929

@@ -79,7 +79,7 @@ def check_if_todolist_exists(self, list_name):
7979

8080

8181
def write_to_app_data(self):
82-
with open('app_data.json', 'w') as json_file:
82+
with open(join(self.script_directory, "app_data.json"), 'w') as json_file:
8383
json.dump(self.app_data, json_file, indent=4)
8484

8585
def write_to_todolist_file(self, **kwargs):

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PyQt5

0 commit comments

Comments
 (0)