1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 07:23:03 +08:00

refactor(modules): 将 AutoScriptEngine 移至 dsl/,ConfigUtils 移至 managers/config/,修复单一职责和依赖倒置问题

This commit is contained in:
2026-05-10 15:32:26 +08:00
parent 22d3c3462c
commit bbd97970a6
8 changed files with 15 additions and 8 deletions
+9
View File
@@ -0,0 +1,9 @@
"""
DSL module for the AutoLibrary project.
Contains the AutoScript DSL engine and related components
for preprocessing user reservation data in timer tasks.
Classes:
- AutoScriptEngine: AutoScript script engine class.
"""
+1 -1
View File
@@ -17,7 +17,7 @@ from PySide6.QtWidgets import (
QGroupBox, QSizePolicy QGroupBox, QSizePolicy
) )
from utils.AutoScriptEngine import AutoScriptEngine from dsl.AutoScriptEngine import AutoScriptEngine
VARIABLE_META = AutoScriptEngine.VARIABLE_META VARIABLE_META = AutoScriptEngine.VARIABLE_META
+1 -1
View File
@@ -24,7 +24,7 @@ import managers.config.ConfigManager as ConfigManager
from utils.JSONReader import JSONReader from utils.JSONReader import JSONReader
from utils.JSONWriter import JSONWriter from utils.JSONWriter import JSONWriter
from utils.ConfigUtils import ConfigUtils from managers.config.ConfigUtils import ConfigUtils
from gui.resources.ui.Ui_ALConfigWidget import Ui_ALConfigWidget from gui.resources.ui.Ui_ALConfigWidget import Ui_ALConfigWidget
from gui.ALSeatMapSelectDialog import ALSeatMapSelectDialog from gui.ALSeatMapSelectDialog import ALSeatMapSelectDialog
+1 -1
View File
@@ -20,7 +20,7 @@ from PySide6.QtGui import (
) )
from base.MsgBase import MsgBase from base.MsgBase import MsgBase
from utils.ConfigUtils import ConfigUtils from managers.config.ConfigUtils import ConfigUtils
from gui.resources.ui.Ui_ALMainWindow import Ui_ALMainWindow from gui.resources.ui.Ui_ALMainWindow import Ui_ALMainWindow
from gui.resources import ALResource from gui.resources import ALResource
+1 -1
View File
@@ -18,7 +18,7 @@ from PySide6.QtCore import (
from base.MsgBase import MsgBase from base.MsgBase import MsgBase
from operators.AutoLib import AutoLib from operators.AutoLib import AutoLib
from utils.JSONReader import JSONReader from utils.JSONReader import JSONReader
from utils.AutoScriptEngine import AutoScriptEngine from dsl.AutoScriptEngine import AutoScriptEngine
class AutoLibWorker(MsgBase, QThread): class AutoLibWorker(MsgBase, QThread):
@@ -43,4 +43,4 @@ class ConfigUtils:
data = {"current": index, "paths": paths} data = {"current": index, "paths": paths}
auto_config[f"{cfg_type}_path"] = data auto_config[f"{cfg_type}_path"] = data
cfg_mgr.set(ConfigManager.ConfigType.GLOBAL, "automation", auto_config) cfg_mgr.set(ConfigManager.ConfigType.GLOBAL, "automation", auto_config)
return config_paths return config_paths
+1 -3
View File
@@ -5,6 +5,4 @@
- TimerUtils: Timer utils class for the AutoLibrary project. - TimerUtils: Timer utils class for the AutoLibrary project.
- JSONReader: JSON reader class for the AutoLibrary project. - JSONReader: JSON reader class for the AutoLibrary project.
- JSONWriter: JSON writer class for the AutoLibrary project. - JSONWriter: JSON writer class for the AutoLibrary project.
- ConfigUtils: Config utils class for the AutoLibrary project. """
- AutoScriptEngine: AutoScript script engine class for the AutoLibrary project.
"""