mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-18 15:33:03 +08:00
style(*): 将中文逗号替换为英文逗号
This commit is contained in:
@@ -302,7 +302,7 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
|
|||||||
self.__alConfigWidget = None
|
self.__alConfigWidget = None
|
||||||
self.__config_paths = ConfigManager.getValidateAutomationConfigPaths()
|
self.__config_paths = ConfigManager.getValidateAutomationConfigPaths()
|
||||||
self.setControlButtons(True, None, None)
|
self.setControlButtons(True, None, None)
|
||||||
self._showLog("配置窗口已关闭,配置文件路径已更新")
|
self._showLog("配置窗口已关闭,配置文件路径已更新")
|
||||||
|
|
||||||
@Slot(dict)
|
@Slot(dict)
|
||||||
def onTimerTaskIsReady(
|
def onTimerTaskIsReady(
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ class ALTimerTaskManageWidget(QWidget, Ui_ALTimerTaskManageWidget):
|
|||||||
QMessageBox.warning(
|
QMessageBox.warning(
|
||||||
self,
|
self,
|
||||||
"警告 - AutoLibrary",
|
"警告 - AutoLibrary",
|
||||||
f"存在 {in_queue_count} 个正在执行或已就绪的队列任务,无法清除所有定时任务 !"
|
f"存在 {in_queue_count} 个正在执行或已就绪的队列任务,无法清除所有定时任务 !"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
# repeat tasks ask before clear
|
# repeat tasks ask before clear
|
||||||
@@ -463,7 +463,7 @@ class ALTimerTaskManageWidget(QWidget, Ui_ALTimerTaskManageWidget):
|
|||||||
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No
|
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No
|
||||||
)
|
)
|
||||||
msgbox.setText(
|
msgbox.setText(
|
||||||
f"存在 {repeat_tasks_count} 个可重复性任务,\n"
|
f"存在 {repeat_tasks_count} 个可重复性任务,\n"
|
||||||
"删除可重复性任务将同时删除所有已执行的记录 !\n"
|
"删除可重复性任务将同时删除所有已执行的记录 !\n"
|
||||||
"是否继续 ?"
|
"是否继续 ?"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class AutoLib(MsgBase):
|
|||||||
else:
|
else:
|
||||||
result = 1
|
result = 1
|
||||||
else:
|
else:
|
||||||
self._showTrace(f"用户 {username} 无法预约,已跳过")
|
self._showTrace(f"用户 {username} 无法预约, 已跳过")
|
||||||
result = 2
|
result = 2
|
||||||
|
|
||||||
# checkin
|
# checkin
|
||||||
@@ -255,7 +255,7 @@ class AutoLib(MsgBase):
|
|||||||
else:
|
else:
|
||||||
result = 1
|
result = 1
|
||||||
else:
|
else:
|
||||||
self._showTrace(f"用户 {username} 无法签到,已跳过")
|
self._showTrace(f"用户 {username} 无法签到, 已跳过")
|
||||||
result = 2
|
result = 2
|
||||||
if last_result == 0: # partly success
|
if last_result == 0: # partly success
|
||||||
result = 0
|
result = 0
|
||||||
@@ -277,7 +277,7 @@ class AutoLib(MsgBase):
|
|||||||
else:
|
else:
|
||||||
result = 1
|
result = 1
|
||||||
else:
|
else:
|
||||||
self._showTrace(f"用户 {username} 无法续约,已跳过")
|
self._showTrace(f"用户 {username} 无法续约, 已跳过")
|
||||||
result = 2
|
result = 2
|
||||||
if last_result == 0: # partly success
|
if last_result == 0: # partly success
|
||||||
result = 0
|
result = 0
|
||||||
@@ -322,7 +322,7 @@ class AutoLib(MsgBase):
|
|||||||
)
|
)
|
||||||
if r == -1:
|
if r == -1:
|
||||||
self._showTrace(
|
self._showTrace(
|
||||||
f"用户 {user["username"]} 处理过程中页面发生异常,无法继续操作, 任务已终止 !",
|
f"用户 {user["username"]} 处理过程中页面发生异常, 无法继续操作, 任务已终止 !",
|
||||||
self.TraceLevel.WARNING
|
self.TraceLevel.WARNING
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ class LibChecker(LibOperator):
|
|||||||
else:
|
else:
|
||||||
self._showTrace(f"\n"\
|
self._showTrace(f"\n"\
|
||||||
f" 续约失败 !\n"\
|
f" 续约失败 !\n"\
|
||||||
f" 续约后结束时间为 {act_record["time"]["end"]},与预期结束时间 {record["time"]["end"]} 不符 !"
|
f" 续约后结束时间为 {act_record["time"]["end"]},与预期结束时间 {record["time"]["end"]} 不符 !"
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
self._showTrace(f"用户在 {date} 没有有效预约记录, 无法检查续约结果")
|
self._showTrace(f"用户在 {date} 没有有效预约记录, 无法检查续约结果")
|
||||||
|
|||||||
@@ -130,10 +130,10 @@ class LibRenew(LibTimeSelector):
|
|||||||
if target_renew_mins > LIBRARY_CLOSE_TIME:
|
if target_renew_mins > LIBRARY_CLOSE_TIME:
|
||||||
actual_renew_duration = LIBRARY_CLOSE_TIME - self._timeStrToMins(end_time)
|
actual_renew_duration = LIBRARY_CLOSE_TIME - self._timeStrToMins(end_time)
|
||||||
if actual_renew_duration <= 0:
|
if actual_renew_duration <= 0:
|
||||||
self._showTrace(f"当前结束时间 {end_time} 已接近闭馆时间,无法续约 !", self.TraceLevel.ERROR)
|
self._showTrace(f"当前结束时间 {end_time} 已接近闭馆时间,无法续约 !", self.TraceLevel.ERROR)
|
||||||
return False
|
return False
|
||||||
self._showTrace(
|
self._showTrace(
|
||||||
f"续约时间已调整至闭馆时间 {self._minsToTimeStr(LIBRARY_CLOSE_TIME)},"
|
f"续约时间已调整至闭馆时间 {self._minsToTimeStr(LIBRARY_CLOSE_TIME)},"
|
||||||
f"实际续约时长为 {actual_renew_duration//60} 小时 {actual_renew_duration%60} 分钟"
|
f"实际续约时长为 {actual_renew_duration//60} 小时 {actual_renew_duration%60} 分钟"
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ def initializeConfigManager(
|
|||||||
new_config_dir = os.path.join(app_dir, "configs")
|
new_config_dir = os.path.join(app_dir, "configs")
|
||||||
if QDir(old_config_dir).exists(): # old config dir exists
|
if QDir(old_config_dir).exists(): # old config dir exists
|
||||||
#we rename it to compatible with new version
|
#we rename it to compatible with new version
|
||||||
logger.info("存在旧配置目录 %s,将其重命名为 %s", old_config_dir, new_config_dir)
|
logger.info("存在旧配置目录 %s,将其重命名为 %s", old_config_dir, new_config_dir)
|
||||||
if not QDir().rename(old_config_dir, new_config_dir):
|
if not QDir().rename(old_config_dir, new_config_dir):
|
||||||
logger.error("重命名旧配置目录 %s 到 %s 失败", old_config_dir, new_config_dir)
|
logger.error("重命名旧配置目录 %s 到 %s 失败", old_config_dir, new_config_dir)
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -240,5 +240,5 @@ def instance(
|
|||||||
return _config_manager_instance
|
return _config_manager_instance
|
||||||
if getBaseConfigDir() != config_dir:
|
if getBaseConfigDir() != config_dir:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"ConfigManager 的实例已初始化,不能使用不同的配置目录。")
|
"ConfigManager 的实例已初始化,不能使用不同的配置目录。")
|
||||||
return _config_manager_instance
|
return _config_manager_instance
|
||||||
|
|||||||
Reference in New Issue
Block a user