style: normalize code formatting across the codebase
- Standardize quote style (single to double quotes) - Improve code formatting consistency - Apply formatting to utilities, GUI components, and tools - Update imports and docstrings for consistency Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,10 @@ class ProgressInfo:
|
||||
|
||||
用于在后台任务和 GUI 之间传递进度信息。
|
||||
"""
|
||||
stage: str # 阶段标识: 'login', 'query', 'download', 'logout', 'convert', 'complete'
|
||||
|
||||
stage: (
|
||||
str # 阶段标识: 'login', 'query', 'download', 'logout', 'convert', 'complete'
|
||||
)
|
||||
current: int # 当前进度值
|
||||
total: int # 总量
|
||||
message: str # 显示给用户的消息
|
||||
@@ -43,12 +46,12 @@ class ProgressCalculator:
|
||||
|
||||
# 各阶段在总进度中的占比
|
||||
STAGE_WEIGHTS = {
|
||||
'login': 5, # 登录: 0-5%
|
||||
'query': 5, # 查询: 5-10%
|
||||
'download': 65, # 下载: 10-75%
|
||||
'logout': 5, # 注销: 75-80%
|
||||
'convert': 15, # 转换: 80-95%
|
||||
'complete': 5, # 完成: 95-100%
|
||||
"login": 5, # 登录: 0-5%
|
||||
"query": 5, # 查询: 5-10%
|
||||
"download": 65, # 下载: 10-75%
|
||||
"logout": 5, # 注销: 75-80%
|
||||
"convert": 15, # 转换: 80-95%
|
||||
"complete": 5, # 完成: 95-100%
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
@@ -76,7 +79,7 @@ class ProgressCalculator:
|
||||
"""
|
||||
stage = progress.stage
|
||||
|
||||
if stage == 'complete':
|
||||
if stage == "complete":
|
||||
return 100
|
||||
|
||||
if stage not in self._stage_offsets:
|
||||
|
||||
Reference in New Issue
Block a user