From 910e3e322477fcdd0139c5c92ddf6e1a44f3f00d Mon Sep 17 00:00:00 2001 From: KenanZhu <3471685733@qq.com> Date: Thu, 28 May 2026 01:35:55 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=20=5F=5Finit=5F=5F.?= =?UTF-8?q?py=20=E8=AE=B8=E5=8F=AF=E5=A4=B4=E4=B8=BA=E7=89=88=E6=9D=83?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E5=B9=B6=E6=94=B9=E7=94=A8=E7=9B=B8=E5=AF=B9?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- src/autoscript/__init__.py | 11 +------- src/base/__init__.py | 11 +++++--- src/boot/__init__.py | 11 +++++--- src/gui/ALAutoScriptOrchDialog/__init__.py | 11 ++++++-- src/gui/__init__.py | 24 +++++----------- src/gui/resources/__init__.py | 10 +++++-- src/interfaces/__init__.py | 14 ++++----- src/managers/__init__.py | 13 +++++---- src/managers/config/__init__.py | 11 +++++--- src/managers/driver/__init__.py | 13 +++++---- src/managers/log/__init__.py | 11 +++++--- src/pages/__init__.py | 33 +++++++--------------- src/pages/components/__init__.py | 18 ++++-------- src/pages/flows/__init__.py | 12 ++------ src/pages/flows/_helpers.py | 8 +----- src/pages/services/__init__.py | 12 ++------ src/pages/strategies/__init__.py | 13 +-------- src/utils/__init__.py | 11 ++++---- 18 files changed, 102 insertions(+), 145 deletions(-) diff --git a/src/autoscript/__init__.py b/src/autoscript/__init__.py index a3397b9..cc78a3d 100644 --- a/src/autoscript/__init__.py +++ b/src/autoscript/__init__.py @@ -7,16 +7,7 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from autoscript.ASEngine import ASEngine - - -__all__ = [ - "ASEngine", - "createEngine", - "createMockTargetData", - "createAllVariablesTable", - "createTargetVarDefs", -] +from .ASEngine import ASEngine _TARGET_VAR_DEFS = [ diff --git a/src/base/__init__.py b/src/base/__init__.py index 7becebc..5cb1dac 100644 --- a/src/base/__init__.py +++ b/src/base/__init__.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- """ - Base module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - MsgBase: Base class for messages. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/boot/__init__.py b/src/boot/__init__.py index 393e4ca..5cb1dac 100644 --- a/src/boot/__init__.py +++ b/src/boot/__init__.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- """ - Boot module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - AppInitializer: Application initializer class. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/gui/ALAutoScriptOrchDialog/__init__.py b/src/gui/ALAutoScriptOrchDialog/__init__.py index 38ca871..ead444a 100644 --- a/src/gui/ALAutoScriptOrchDialog/__init__.py +++ b/src/gui/ALAutoScriptOrchDialog/__init__.py @@ -1,3 +1,10 @@ -from gui.ALAutoScriptOrchDialog._dialog import ALAutoScriptOrchDialog +# -*- coding: utf-8 -*- +""" +Copyright (c) 2026 KenanZhu. +All rights reserved. -__all__ = ["ALAutoScriptOrchDialog"] +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" +from ._dialog import ALAutoScriptOrchDialog diff --git a/src/gui/__init__.py b/src/gui/__init__.py index 6e687ba..5cb1dac 100644 --- a/src/gui/__init__.py +++ b/src/gui/__init__.py @@ -1,19 +1,9 @@ +# -*- coding: utf-8 -*- """ - GUI module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - ALMainWindow: Main window class. - - ALAboutDialog: About dialog class. - - ALConfigWidget: Configuration widget class. - - ALSeatFrame: Seat frame class. - - ALSeatMapView: Seat map view class. - - ALSeatMapTable: Seat map table class. - - ALSeatMapSelectDialog: Seat map select dialog class. - - ALTimerTaskAddDialog: Timer task add dialog class. - - ALAutoScriptOrchDialog: AutoScript orchestration dialog class. - - ALTimerTaskHistoryDialog: Timer task history dialog class. - - ALTimerTaskManageWidget: Timer task manage widget class. - - ALUserTreeWidget: User tree widget class. - - ALMainWorkers: Main workers class. - - ALVersionInfo: Version info class. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/gui/resources/__init__.py b/src/gui/resources/__init__.py index 482953b..5cb1dac 100644 --- a/src/gui/resources/__init__.py +++ b/src/gui/resources/__init__.py @@ -1,3 +1,9 @@ +# -*- coding: utf-8 -*- +""" +Copyright (c) 2026 KenanZhu. +All rights reserved. + +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. """ - GUI resources module for the AutoLibrary project. -""" \ No newline at end of file diff --git a/src/interfaces/__init__.py b/src/interfaces/__init__.py index 2df5c1b..5cb1dac 100644 --- a/src/interfaces/__init__.py +++ b/src/interfaces/__init__.py @@ -1,11 +1,9 @@ +# -*- coding: utf-8 -*- """ - Interfaces module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Defines abstract interfaces (Protocols) and shared type definitions - used across layers to decouple consumers from concrete implementations. - - Key components: - - ConfigProvider: Abstract interface for configuration access. - - ConfigType: Enumeration of configuration file types. - - ConfigKey: Type-safe hierarchical key constants for config lookups. +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. """ diff --git a/src/managers/__init__.py b/src/managers/__init__.py index 6665757..5cb1dac 100644 --- a/src/managers/__init__.py +++ b/src/managers/__init__.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- """ - Managers module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - ConfigManager: Config manager for managing configuration files. - - LogManager: Log manager for logging. - - WebDriverManager: Web driver manager for managing web drivers. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/managers/config/__init__.py b/src/managers/config/__init__.py index 1c1c60e..5cb1dac 100644 --- a/src/managers/config/__init__.py +++ b/src/managers/config/__init__.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- """ - Config managers module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - ConfigManager: Config manager for managing configuration files. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/managers/driver/__init__.py b/src/managers/driver/__init__.py index 7e0b908..5cb1dac 100644 --- a/src/managers/driver/__init__.py +++ b/src/managers/driver/__init__.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- """ - Driver managers module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - WebBrowserDetector: Web browser detector class. - - WebDriverDownloader: Web driver downloader class. - - WebDriverManager: Web driver manager class. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/managers/log/__init__.py b/src/managers/log/__init__.py index bdf450a..5cb1dac 100644 --- a/src/managers/log/__init__.py +++ b/src/managers/log/__init__.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- """ - Log managers module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - LogManager: Log manager for logging. -""" \ No newline at end of file +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. +""" diff --git a/src/pages/__init__.py b/src/pages/__init__.py index 5b0d495..e18a881 100644 --- a/src/pages/__init__.py +++ b/src/pages/__init__.py @@ -7,26 +7,13 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from pages.AutoLib import AutoLib -from pages.LoginPage import LoginPage -from pages.MainShell import MainShell -from pages.ReserveView import ReserveView -from pages.RecordsView import RecordsView -from pages.components.SeatMapDialog import SeatMapDialog -from pages.components.TimeSelectDialog import TimeSelectDialog -from pages.components.ReserveResultDialog import ReserveResultDialog -from pages.components.CheckinResultDialog import CheckinResultDialog -from pages.components.RenewDialog import RenewDialog - -__all__ = [ - "AutoLib", - "LoginPage", - "MainShell", - "ReserveView", - "RecordsView", - "SeatMapDialog", - "TimeSelectDialog", - "ReserveResultDialog", - "CheckinResultDialog", - "RenewDialog", -] +from .AutoLib import AutoLib +from .LoginPage import LoginPage +from .MainShell import MainShell +from .ReserveView import ReserveView +from .RecordsView import RecordsView +from .components.SeatMapDialog import SeatMapDialog +from .components.TimeSelectDialog import TimeSelectDialog +from .components.ReserveResultDialog import ReserveResultDialog +from .components.CheckinResultDialog import CheckinResultDialog +from .components.RenewDialog import RenewDialog diff --git a/src/pages/components/__init__.py b/src/pages/components/__init__.py index 3d61a36..f5b8f98 100644 --- a/src/pages/components/__init__.py +++ b/src/pages/components/__init__.py @@ -7,16 +7,8 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from pages.components.SeatMapDialog import SeatMapDialog -from pages.components.TimeSelectDialog import TimeSelectDialog -from pages.components.ReserveResultDialog import ReserveResultDialog -from pages.components.CheckinResultDialog import CheckinResultDialog -from pages.components.RenewDialog import RenewDialog - -__all__ = [ - "SeatMapDialog", - "TimeSelectDialog", - "ReserveResultDialog", - "CheckinResultDialog", - "RenewDialog", -] +from .SeatMapDialog import SeatMapDialog +from .TimeSelectDialog import TimeSelectDialog +from .ReserveResultDialog import ReserveResultDialog +from .CheckinResultDialog import CheckinResultDialog +from .RenewDialog import RenewDialog diff --git a/src/pages/flows/__init__.py b/src/pages/flows/__init__.py index c8f1d9f..764e56f 100644 --- a/src/pages/flows/__init__.py +++ b/src/pages/flows/__init__.py @@ -7,12 +7,6 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from pages.flows.ReserveFlow import ReserveFlow -from pages.flows.CheckinFlow import CheckinFlow -from pages.flows.RenewFlow import RenewFlow - -__all__ = [ - "ReserveFlow", - "CheckinFlow", - "RenewFlow", -] +from .ReserveFlow import ReserveFlow +from .CheckinFlow import CheckinFlow +from .RenewFlow import RenewFlow diff --git a/src/pages/flows/_helpers.py b/src/pages/flows/_helpers.py index 886d17c..ac16c01 100644 --- a/src/pages/flows/_helpers.py +++ b/src/pages/flows/_helpers.py @@ -9,11 +9,5 @@ See the LICENSE file for details. """ from pages.strategies.TimeSelectMaker import ( minsToTimeStr, - timeStrToMins + timeStrToMins, ) - - -__all__ = [ - "minsToTimeStr", - "timeStrToMins", -] \ No newline at end of file diff --git a/src/pages/services/__init__.py b/src/pages/services/__init__.py index cee361c..eff9ebe 100644 --- a/src/pages/services/__init__.py +++ b/src/pages/services/__init__.py @@ -7,12 +7,6 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from pages.services.CaptchaSolver import CaptchaSolver -from pages.services.ReserveChecker import ReserveChecker -from pages.services.RecordChecker import RecordChecker - -__all__ = [ - "CaptchaSolver", - "ReserveChecker", - "RecordChecker", -] +from .CaptchaSolver import CaptchaSolver +from .ReserveChecker import ReserveChecker +from .RecordChecker import RecordChecker diff --git a/src/pages/strategies/__init__.py b/src/pages/strategies/__init__.py index 23597e4..e28c45e 100644 --- a/src/pages/strategies/__init__.py +++ b/src/pages/strategies/__init__.py @@ -7,7 +7,7 @@ This software is provided "as is", without any warranty of any kind. You may use, modify, and distribute this file under the terms of the MIT License. See the LICENSE file for details. """ -from pages.strategies.TimeSelectMaker import ( +from .TimeSelectMaker import ( TimeSelectMaker, TimeDecisionMaker, TimeOptionReader, @@ -17,14 +17,3 @@ from pages.strategies.TimeSelectMaker import ( TimeSelectionResult, TimeRangeResult, ) - -__all__ = [ - "TimeSelectMaker", - "TimeDecisionMaker", - "TimeOptionReader", - "ReserveTimeReader", - "RenewTimeReader", - "TimeOption", - "TimeSelectionResult", - "TimeRangeResult", -] diff --git a/src/utils/__init__.py b/src/utils/__init__.py index b84955c..5cb1dac 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- """ - Utils module for the AutoLibrary project. +Copyright (c) 2026 KenanZhu. +All rights reserved. - Here are the classes and modules in this package: - - TimerUtils: Timer utils class for the AutoLibrary project. - - JSONReader: JSON reader class for the AutoLibrary project. - - JSONWriter: JSON writer class for the AutoLibrary project. +This software is provided "as is", without any warranty of any kind. +You may use, modify, and distribute this file under the terms of the MIT License. +See the LICENSE file for details. """