From 66403406db097c77eee53d1830c68117396557e4 Mon Sep 17 00:00:00 2001 From: hyb-oyqq <1512383570@qq.com> Date: Wed, 13 Aug 2025 12:48:25 +0800 Subject: [PATCH] =?UTF-8?q?style(core):=20=E8=B0=83=E6=95=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=A9=E8=BF=9B=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正 ExtractionHandler 类中的缩进问题 - 修正 CloudflareOptimizer 类中的多个缩进问题 - 统一使用一致的缩进格式,提高代码可读性 --- source/core/handlers/extraction_handler.py | 2 +- source/core/managers/cloudflare_optimizer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/core/handlers/extraction_handler.py b/source/core/handlers/extraction_handler.py index 27ffe4d..3c36520 100644 --- a/source/core/handlers/extraction_handler.py +++ b/source/core/handlers/extraction_handler.py @@ -111,7 +111,7 @@ class ExtractionHandler: else: # 用户选择停止,保持窗口启用状态 if hasattr(self.main_window, 'window_manager'): - self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) + self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) # 通知DownloadManager停止下载队列 self.main_window.download_manager.on_extraction_finished(False) return diff --git a/source/core/managers/cloudflare_optimizer.py b/source/core/managers/cloudflare_optimizer.py index 83b8fdd..3ede98f 100644 --- a/source/core/managers/cloudflare_optimizer.py +++ b/source/core/managers/cloudflare_optimizer.py @@ -334,7 +334,7 @@ class CloudflareOptimizer: # 恢复主窗口状态 self.main_window.setEnabled(True) if hasattr(self.main_window, 'window_manager'): - self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) + self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) return False # 用户点击了继续,重新禁用主窗口 @@ -406,7 +406,7 @@ class CloudflareOptimizer: # 恢复主窗口状态 self.main_window.setEnabled(True) if hasattr(self.main_window, 'window_manager'): - self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) + self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) return False else: QtWidgets.QMessageBox.critical( @@ -416,7 +416,7 @@ class CloudflareOptimizer: ) # 恢复主窗口状态 if hasattr(self.main_window, 'window_manager'): - self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) + self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY) return False # 用户点击了继续,重新禁用主窗口