清理无用代码、合并工具链、修复注释与日志问题
- 删除破损文件: main.py/main.ui/main_ui.py - 删除 runtime_hook.py(归宿主维护),清除 tools/ 目录 - 合并 export_runtime/pack_zip/verify_companions 到 build_pyd.py - 修复注释: docstring 参数与实际签名不一致、过时引用、拼写错误 - 修复日志: 消除静默吞异常、删冗余 log+raise、补缺失日志 - 精简 .gitignore
This commit is contained in:
@@ -106,6 +106,7 @@ class MILProject(QFrame, Ui_FrameMILProject):
|
||||
else:
|
||||
path,type = QFileDialog.getOpenFileName(self, "选择文件", "./","Excel工作簿(*.xlsx)")
|
||||
if not os.path.exists(path):
|
||||
logger.debug(f"数据文件选择已取消: {dataPath}")
|
||||
return
|
||||
self.lineEditDataPath.setText(path)
|
||||
self.on_datapath_editing_finished_event()
|
||||
@@ -117,6 +118,7 @@ class MILProject(QFrame, Ui_FrameMILProject):
|
||||
else:
|
||||
path,type = QFileDialog.getOpenFileName(self, "选择文件", "./","Excel工作簿(*.xlsx)")
|
||||
if not os.path.exists(path):
|
||||
logger.debug(f"测试用例文件选择已取消: {filePath}")
|
||||
return
|
||||
self.lineEditFilePath.setText(path)
|
||||
self.on_filepath_editing_finished_event()
|
||||
+9
-7
@@ -11,8 +11,8 @@ from .mil_project import MILProject
|
||||
|
||||
from mil.core import Config
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
CONF = "mil.json"
|
||||
|
||||
class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
@@ -109,12 +109,11 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
if text == "" or self.lock_event:
|
||||
return
|
||||
|
||||
self.config.CurrProject= text
|
||||
self.config.CurrProject = text
|
||||
self.config.save_config()
|
||||
|
||||
self.DataPath.setText(self.config.ItemConfigs[self.config.CurrProject]["DataPath"])
|
||||
self.FilePath.setText(self.config.ItemConfigs[self.config.CurrProject]["FilePath"])
|
||||
pass
|
||||
|
||||
def on_new_pro_event(self):
|
||||
item = QListWidgetItem()
|
||||
@@ -127,7 +126,6 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
self.listWidget.addItem(item)
|
||||
self.listWidget.setCurrentItem(item)
|
||||
self.listWidget.setItemWidget(item, mil_project)
|
||||
pass
|
||||
|
||||
def add_pro_event(self, name):
|
||||
item = QListWidgetItem()
|
||||
@@ -143,8 +141,9 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
|
||||
def on_del_pro_event(self):
|
||||
mil_project = self.listWidget.itemWidget(self.listWidget.currentItem())
|
||||
if not isinstance(mil_project,MILProject):
|
||||
raise "on_del_pro_event error!!!"
|
||||
if not isinstance(mil_project, MILProject):
|
||||
logger.error("on_del_pro_event: 当前项不是 MILProject 实例")
|
||||
return
|
||||
|
||||
if self.config.CurrProject == mil_project.name:
|
||||
self.config.CurrProject = ""
|
||||
@@ -154,7 +153,6 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
self.config.save_config()
|
||||
|
||||
self.update_config()
|
||||
pass
|
||||
|
||||
def search_mil_pro_item(self, name):
|
||||
for mil_project in self.listWidget.findChildren(MILProject):
|
||||
@@ -171,6 +169,8 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
else:
|
||||
path,type = QFileDialog.getOpenFileName(self, "选择文件", os.getcwd(),"Excel工作簿(*.xlsx)")
|
||||
self.DataPath.setText(path)
|
||||
if not path:
|
||||
return
|
||||
|
||||
self.config.ItemConfigs[self.config.CurrProject]["DataPath"] = path
|
||||
mil_project = self.search_mil_pro_item(self.config.CurrProject)
|
||||
@@ -185,6 +185,8 @@ class FrameMILTool(QFrame,Ui_FrameMILTool):
|
||||
else:
|
||||
path,type = QFileDialog.getOpenFileName(self, "选择文件", os.getcwd(),"Excel工作簿(*.xlsx)")
|
||||
self.FilePath.setText(path)
|
||||
if not path:
|
||||
return
|
||||
|
||||
self.config.ItemConfigs[self.config.CurrProject]["FilePath"] = path
|
||||
mil_project = self.search_mil_pro_item(self.config.CurrProject)
|
||||
|
||||
Reference in New Issue
Block a user