diff --git a/app/tree/environment.py b/app/tree/environment.py index b89df7b..56aa2e7 100644 --- a/app/tree/environment.py +++ b/app/tree/environment.py @@ -11,6 +11,7 @@ from __future__ import annotations import re from pathlib import Path +from collections.abc import Iterable from typing import TYPE_CHECKING, Any import numpy as np @@ -94,7 +95,7 @@ _ENTITY_FIELDS_BY_LEVEL: dict[str, tuple[str, ...]] = { } -def _clean_join(values: object) -> str: +def _clean_join(values: Iterable[object] | None) -> str: """过滤非空字符串、去重(保序)、分号拼接;无有效值返回空串。 参数: