Skip to content

Commit ab92ea9

Browse files
committed
style: format
1 parent 4c4d346 commit ab92ea9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

aao/ui/floating_log_window.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,11 @@ def set_status(self, state: str, attempt: str, round_text: str, last_text: str)
218218

219219
def set_log_html(self, html: str) -> None:
220220
self.txt_log.setHtml(html)
221-
self.txt_log.verticalScrollBar().setValue(
222-
self.txt_log.verticalScrollBar().maximum()
223-
)
221+
self.txt_log.verticalScrollBar().setValue(self.txt_log.verticalScrollBar().maximum())
224222

225223
def append_log(self, html: str) -> None:
226224
self.txt_log.append(html)
227-
self.txt_log.verticalScrollBar().setValue(
228-
self.txt_log.verticalScrollBar().maximum()
229-
)
225+
self.txt_log.verticalScrollBar().setValue(self.txt_log.verticalScrollBar().maximum())
230226

231227
def eventFilter(self, obj: QObject, event: QEvent) -> bool:
232228
if obj is self.lbl_status:

custom/action/executor.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,9 @@ def _perform_action(
335335
self._abort_reason = "pause failed"
336336
return
337337
else:
338-
if not self._pause(context, ctrl, lambda: context.tasker.stopping, ts=ts, target_frame=target_frame):
338+
if not self._pause(
339+
context, ctrl, lambda: context.tasker.stopping, ts=ts, target_frame=target_frame
340+
):
339341
self._abort_reason = "pause failed"
340342
return
341343
if context.tasker.stopping:
@@ -497,7 +499,9 @@ def _pause(
497499
# 模板未命中且离目标较远时, 用 R 验证兜底
498500
# (R 会推进 1 帧, 离目标太近时不值得冒险)
499501
if ts is not None:
500-
remaining = target_frame - ts.total_elapsed_frames if target_frame is not None else 999
502+
remaining = (
503+
target_frame - ts.total_elapsed_frames if target_frame is not None else 999
504+
)
501505
if remaining > 3:
502506
logger.debug("模板未命中, 尝试 R 验证兜底, attempt=%d", attempt + 1)
503507
if self._verify_pause_r(ctrl, ts, attempt):

0 commit comments

Comments
 (0)