chore: 修复 Ruff SIM115

This commit is contained in:
zetaloop
2026-04-25 05:06:53 +08:00
parent 8e53f83d33
commit a186c69ea7
+3 -1
View File
@@ -67,7 +67,9 @@ def discover_targets():
if service_type not in ("api", "rpc", "mq", "adapter"): if service_type not in ("api", "rpc", "mq", "adapter"):
continue continue
go_files = glob(os.path.join(service_dir, "*.go")) go_files = glob(os.path.join(service_dir, "*.go"))
if not go_files or not any("package main" in open(f).read() for f in go_files): if not go_files or not any(
"package main" in Path(f).read_text(encoding="utf-8") for f in go_files
):
continue continue
yamls = glob(os.path.join(service_dir, "etc", "*.yaml")) yamls = glob(os.path.join(service_dir, "etc", "*.yaml"))