From d6c776728ce535e23cc078c9c794058e28041193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B8=AD=E9=B8=AD=E3=80=8C=E3=82=AB=E3=83=A2=E3=80=8D?= <89643991+DuckDuckStudio@users.noreply.github.com> Date: Mon, 7 Sep 2026 22:09:58 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=A7=BB=E9=99=A4=E5=B0=BE=E9=9A=8F?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .gitignore | 4 ++-- src/function/files/manifest.py | 4 ++-- src/function/github/pr.py | 2 +- src/function/maintain/config.py | 7 +++++-- src/tools/maintain/cleanup.py | 2 +- src/tools/maintain/config.py | 2 +- src/tools/maintain/fun.py | 2 +- src/tools/maintain/revert.py | 2 +- 9 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index fc1a14f..f6ad3f6 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,7 +1,7 @@ name: 🚀 新功能请求 / 想法 title: "[Feat]: " description: 提出新功能建议 (这并不意味着你必须实现它)。 -labels: +labels: - "新功能" - "DEV-需要注意" body: diff --git a/.gitignore b/.gitignore index 007710f..a5ba598 100644 --- a/.gitignore +++ b/.gitignore @@ -195,9 +195,9 @@ cython_debug/ .abstra/ # Visual Studio Code -# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore +# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore -# and can be added to the global gitignore or merged into this file. However, if you prefer, +# and can be added to the global gitignore or merged into this file. However, if you prefer, # you could uncomment the following to ignore the entire vscode folder .vscode/ diff --git a/src/function/files/manifest.py b/src/function/files/manifest.py index ded7392..3ff27e7 100644 --- a/src/function/files/manifest.py +++ b/src/function/files/manifest.py @@ -47,7 +47,7 @@ def 获取清单目录( 会验证获取到的清单目录是否存在,不存在则返回 `None`。 此函数没有输出。 - + :param 包标识符: 指定的包标识符 :type 包标识符: str :param 包版本: 指定的包版本 @@ -183,7 +183,7 @@ def FormatManifest(Manifest: str, Comment: str = "# Created with Sundry-Locale") - 添加 schema - 添加工具注释 - 去除末尾多余空行 / 添加末尾空行 - + :param Manifest: 清单文件内容 :type Manifest: str :param Comment: 工具注释内容 diff --git a/src/function/github/pr.py b/src/function/github/pr.py index 55eaa6d..dfcbb41 100644 --- a/src/function/github/pr.py +++ b/src/function/github/pr.py @@ -7,7 +7,7 @@ def 检查重复拉取请求(包标识符: str, 包版本: str) -> bool: - ^1 相同修改: 指标题包含 `f"{包标识符} {包版本}"` 的拉取请求。 - ^2 打开的: 包括草稿 - + :param 包标识符: 修改的包的标识符 :type 包标识符: str :param 包版本: 修改的包的版本 diff --git a/src/function/maintain/config.py b/src/function/maintain/config.py index be04a89..c094aa8 100644 --- a/src/function/maintain/config.py +++ b/src/function/maintain/config.py @@ -98,8 +98,11 @@ class 配置信息: def 验证配置(配置项: 所有配置项 | str, 配置值: str | bool) -> str | None: """ [验证配置] - 验证指定的配置项和配置值的配对是否有效,返回为什么无效。 - 有效返回 None,无效返回 str 原因。 + + 验证指定的配置项和配置值的配对是否有效,返回为什么无效。 + + 有效返回 `None`,无效返回 `str` 原因。 + 配置项 = 键路径 """ diff --git a/src/tools/maintain/cleanup.py b/src/tools/maintain/cleanup.py index f8c3365..29fec24 100644 --- a/src/tools/maintain/cleanup.py +++ b/src/tools/maintain/cleanup.py @@ -57,7 +57,7 @@ def main(哪个工具: str) -> int: def 清理文件(待清理文件路径: str, 哪个工具: str) -> int: """ 删除指定的文件夹并打印日志。 - + :param 待清理文件路径: 指定待清理文件夹的路径 :type 待清理文件路径: str :param 哪个工具: 指定日志输出中的工具名称 diff --git a/src/tools/maintain/config.py b/src/tools/maintain/config.py index 9a1d43b..87243bb 100644 --- a/src/tools/maintain/config.py +++ b/src/tools/maintain/config.py @@ -279,7 +279,7 @@ def main(args: list[str]) -> int: args: 参数列表 Returns: - 退出代码 + 退出代码 """ try: diff --git a/src/tools/maintain/fun.py b/src/tools/maintain/fun.py index a6f2de7..ca69a6f 100644 --- a/src/tools/maintain/fun.py +++ b/src/tools/maintain/fun.py @@ -12,7 +12,7 @@ def main(args: list[str]) -> int: """ sundry fun ... - + :param args: 参数 :type args: list[str] :return: 退出代码 diff --git a/src/tools/maintain/revert.py b/src/tools/maintain/revert.py index 2d79545..40f739e 100644 --- a/src/tools/maintain/revert.py +++ b/src/tools/maintain/revert.py @@ -64,7 +64,7 @@ def main(args: list[str]) -> int: def 还原(哪个仓库: str, 仓库路径: str, 是否已提交: bool, 是否丢弃: bool) -> bool: """ 尝试还原指定的仓库 - + :param 哪个仓库: pkgs 或 tools :type 哪个仓库: str :param 仓库路径: 指定仓库文件夹的所在位置