Skip to content

Commit cd4e2ec

Browse files
committed
format code
1 parent 3560698 commit cd4e2ec

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

GUI/asset_widget.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
QProgressBar,
66
QLabel,
77
QPushButton,
8-
QMessageBox, QStyle,
8+
QMessageBox,
9+
QStyle,
910
)
1011
from PySide6.QtCore import QThread, Signal
1112

@@ -51,12 +52,16 @@ def show_warning_message(self, title, message):
5152
msg_box = QMessageBox(self)
5253
msg_box.setIcon(QMessageBox.Icon.Warning)
5354
msg_box.setWindowTitle(title)
54-
warning_icon = self.style().standardIcon(QStyle.StandardPixmap.SP_MessageBoxWarning)
55+
warning_icon = self.style().standardIcon(
56+
QStyle.StandardPixmap.SP_MessageBoxWarning
57+
)
5558
msg_box.setWindowIcon(warning_icon)
5659
msg_box.setText(message)
5760
msg_box.setStandardButtons(QMessageBox.StandardButton.Ok)
5861
msg_box.setModal(True) # Block interaction with parent widget
59-
msg_box.finished.connect(self.installation_finished.emit) # Cleanup after dismissal
62+
msg_box.finished.connect(
63+
self.installation_finished.emit
64+
) # Cleanup after dismissal
6065
msg_box.show()
6166

6267
def _create_install_widgets(self, layout):
@@ -92,7 +97,9 @@ def install_asset(self):
9297
self.worker.finished.connect(self.thread.quit)
9398
self.worker.finished.connect(self.worker.deleteLater)
9499
self.thread.started.connect(self.worker.run)
95-
self.installation_finished.connect(lambda status: self.remove_from_view()) # Single connection
100+
self.installation_finished.connect(
101+
lambda status: self.remove_from_view()
102+
) # Single connection
96103
self.thread.start()
97104

98105
def _perform_installation(self, progress_callback):

GUI/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self, target_function, *args, **kwargs):
1414
def run(self):
1515
try:
1616
self.target_function(
17-
*self.args, progress_callback=self.progress.emit, **self.kwargs
17+
*self.args, progress_callback=self.progress.emit, **self.kwargs
1818
)
1919
finally:
2020
self.finished.emit()

content_database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ def does_archive_exist(archive_name: str) -> bool:
127127
cursor = conn.cursor()
128128
cursor.execute(
129129
"SELECT EXISTS(SELECT 1 FROM archives WHERE archive_name = ?)",
130-
(archive_name,)
130+
(archive_name,),
131131
)
132132
return cursor.fetchone()[0] == 1

installer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,9 @@ def traverse_directory(
201201

202202

203203
def start_installer_gui(
204-
file_path: str, progress_callback, is_delete_archive: bool = False
204+
file_path: str, progress_callback, is_delete_archive: bool = False
205205
) -> tuple[bool, bool]:
206206
is_archive_imported = False
207-
asset_already_exists = False
208207
file_path = pathlib.Path(file_path)
209208
install_mutex.lock()
210209
try:
@@ -251,4 +250,4 @@ def start_installer_gui(
251250
progress_callback(100)
252251
return (is_archive_imported, False)
253252
finally:
254-
install_mutex.unlock()
253+
install_mutex.unlock()

0 commit comments

Comments
 (0)