From 5842487d5a6bcb13d4b07ce95c2ed5b3f03a8b66 Mon Sep 17 00:00:00 2001 From: John Richard Date: Thu, 10 Jul 2025 20:23:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20=E4=BD=BF=E7=94=A8=E5=85=83?= =?UTF-8?q?=E7=BB=84=E8=A7=A3=E5=8C=85=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/utils.py b/nonebot/utils.py index 066d95594bdf..64637f9ffe43 100644 --- a/nonebot/utils.py +++ b/nonebot/utils.py @@ -279,7 +279,7 @@ def path_to_module_name(path: Path) -> str: if rel_path.stem == "__init__": return ".".join(rel_path.parts[:-1]) else: - return ".".join(rel_path.parts[:-1] + (rel_path.stem,)) + return ".".join((*rel_path.parts[:-1], rel_path.stem)) def resolve_dot_notation( From f4d08260928360aaf3dad79b7f2652e9bd579915 Mon Sep 17 00:00:00 2001 From: Ailitonia <41713304+ailitonia@users.noreply.github.com> Date: Fri, 11 Jul 2025 09:34:40 +0800 Subject: [PATCH 2/2] refactor: Fix ruff `RUF005` diagnostic in `nonebot/utils.py:282:25` --- nonebot/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/utils.py b/nonebot/utils.py index 066d95594bdf..64637f9ffe43 100644 --- a/nonebot/utils.py +++ b/nonebot/utils.py @@ -279,7 +279,7 @@ def path_to_module_name(path: Path) -> str: if rel_path.stem == "__init__": return ".".join(rel_path.parts[:-1]) else: - return ".".join(rel_path.parts[:-1] + (rel_path.stem,)) + return ".".join((*rel_path.parts[:-1], rel_path.stem)) def resolve_dot_notation(