Skip to content

Commit 0f0ee30

Browse files
committed
feat: 添加文件头信息和作者注释以增强代码可读性
1 parent ed68237 commit 0f0ee30

29 files changed

+541
-135
lines changed

MFW_resource/i18n/lrelease.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
"""
20+
MFW-ChainFlow Assistant
21+
MFW-ChainFlow Assistant i18n 翻译脚本
22+
作者:overflow65537
23+
"""
24+
25+
26+
127
import os
228
import subprocess
329
import sys # 新增:导入 sys 模块

app/common/config.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
"""
20+
MFW-ChainFlow Assistant
21+
MFW-ChainFlow Assistant 配置
22+
作者:overflow65537
23+
"""
24+
25+
126
import sys
227
from enum import Enum
328

app/common/icon.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
# This file incorporates work covered by the following copyright and
20+
# permission notice:
21+
#
22+
# PyQt-Fluent-Widgets Copyright (C) 2023-2025 zhiyiYo
23+
# https://github.com/zhiyiYo/PyQt-Fluent-Widgets
24+
25+
"""
26+
MFW-ChainFlow Assistant
27+
MFW-ChainFlow Assistant 图标
28+
原作者:zhiyiYo
29+
修改:overflow65537
30+
"""
31+
132
from enum import Enum
233

334
from qfluentwidgets import FluentIconBase, getIconColor, Theme

app/common/maa_config_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
# Contact: err.overflow@gmail.com
1717
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
1818

19+
"""
20+
MFW-ChainFlow Assistant
21+
MFW-ChainFlow Assistant maa config配置对象
22+
作者:overflow65537
23+
"""
24+
1925
from ..common.signal_bus import signalBus
2026
from ..utils.tool import Read_Config, show_error_message
2127
from ..common.config import cfg

app/common/signal_bus.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
20+
"""
21+
MFW-ChainFlow Assistant
22+
MFW-ChainFlow Assistant 信号总线
23+
作者:overflow65537
24+
"""
25+
126
from PySide6.QtCore import Signal, QObject
227

328

app/common/style_sheet.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
# This file incorporates work covered by the following copyright and
20+
# permission notice:
21+
#
22+
# PyQt-Fluent-Widgets Copyright (C) 2023-2025 zhiyiYo
23+
# https://github.com/zhiyiYo/PyQt-Fluent-Widgets
24+
25+
"""
26+
MFW-ChainFlow Assistant
27+
MFW-ChainFlow Assistant 主题样式表
28+
原作者:zhiyiYo
29+
修改:overflow65537
30+
"""
31+
132
from enum import Enum
233

334
from qfluentwidgets import StyleSheetBase, Theme, qconfig

app/common/typeddict.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
20+
"""
21+
MFW-ChainFlow Assistant
22+
MFW-ChainFlow Assistant 类型标记
23+
作者:overflow65537
24+
"""
25+
126
from typing import Dict, List, TypedDict,Optional,Any
227

328

app/utils/check_utils.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
20+
"""
21+
MFW-ChainFlow Assistant
22+
MFW-ChainFlow Assistant 检查单元
23+
作者:overflow65537
24+
"""
25+
126
import os
227
import json
328
from typing import Dict

app/utils/logger.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
20+
"""
21+
MFW-ChainFlow Assistant
22+
MFW-ChainFlow Assistant 日志单元
23+
作者:overflow65537
24+
"""
25+
126
import logging
227
import os
328

app/utils/maafw.py

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
# This file is part of MFW-ChainFlow Assistant.
2+
3+
# MFW-ChainFlow Assistant is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published
5+
# by the Free Software Foundation, either version 3 of the License,
6+
# or (at your option) any later version.
7+
8+
# MFW-ChainFlow Assistant is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty
10+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11+
# the GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with MFW-ChainFlow Assistant. If not, see <https://www.gnu.org/licenses/>.
15+
16+
# Contact: err.overflow@gmail.com
17+
# Copyright (C) 2024-2025 MFW-ChainFlow Assistant. All rights reserved.
18+
19+
# MIT License
20+
#
21+
# Copyright (c) 2024 MaaXYZ
22+
#
23+
# Permission is hereby granted, free of charge, to any person obtaining a copy
24+
# of this software and associated documentation files (the "Software"), to deal
25+
# in the Software without restriction, including without limitation the rights
26+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27+
# copies of the Software, and to permit persons to whom the Software is
28+
# furnished to do so, subject to the following conditions:
29+
#
30+
# The above copyright notice and this permission notice shall be included in all
31+
# copies or substantial portions of the Software.
32+
#
33+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39+
# SOFTWARE.
40+
41+
"""
42+
MFW-ChainFlow Assistant
43+
MFW-ChainFlow Assistant MaaFW核心
44+
原作者: MaaXYZ
45+
地址: https://github.com/MaaXYZ/MaaDebugger
46+
修改:overflow65537
47+
"""
48+
149
import re
250
import os
351
import importlib.util
@@ -17,9 +65,10 @@
1765
from ..common.maa_config_data import maa_config_data
1866
from ..common.config import cfg
1967
from ..utils.tool import Read_Config,path_to_list
20-
from ..utils.process_thread import ProcessThread
68+
from ..utils.tool import ProcessThread
2169

2270

71+
# 以下代码引用自 MaaDebugger 项目的 ./src/MaaDebugger/maafw/__init__.py 文件,用于生成maafw实例
2372
class MaaFW:
2473

2574
resource: Resource | None

0 commit comments

Comments
 (0)