Reject empty attribution semantics headers

This commit is contained in:
2026-04-07 18:05:44 +08:00
parent 88d765713e
commit a66b039d2d
2 changed files with 109 additions and 0 deletions

View File

@@ -490,6 +490,8 @@ def _beta_header_name(factor_name: str) -> str:
def _semantics_have_unique_headers(semantics: dict[str, str]) -> bool:
headers = [_beta_header_name(semantics[column]) for column in SEMANTIC_BETA_COLUMNS]
if any(header == "beta_" for header in headers):
return False
return len(headers) == len(set(headers))