Merge remote-tracking branch 'origin/sub_laptop_1' into CODEX

This commit is contained in:
2026-11-11 14:24:22 +09:00
6 changed files with 179 additions and 165 deletions
@@ -149,6 +149,11 @@ COLS = {
),
}
COLS["한국은행환율"] = COLS["유가전력"]
ALIAS = "별칭" # 요소 줄 덧칸(815-2) — 열 한 벌 밖 · 있으면 빈 글 아님
def _cols_of(row: dict) -> tuple:
return tuple(k for k in row if k != ALIAS)
def _detail(name: str) -> str:
@@ -310,7 +315,9 @@ def check_form(name: str, data: dict) -> list[str]:
out.append(f"{where} · 출처 모양 「{row['출처']}」")
if data.get("그룹") == "인력":
out += _check_labor(where, row)
if cols and tuple(row) != cols:
if ALIAS in row and not (isinstance(row[ALIAS], str) and row[ALIAS].strip()):
out.append(f"{where} · 「{ALIAS}」 이 빈 글 · 글 아님(빈 칸이면 칸을 두지 않음)")
if cols and _cols_of(row) != cols:
out.append(f"{where} · 열이 한 벌이 아님 — 「{' · '.join(cols)}」")
if kind == "품셈재료":
out += _check_linked(where, row)
@@ -328,7 +335,7 @@ def check_form(name: str, data: dict) -> list[str]:
def _check_labor(where: str, row: dict) -> list[str]:
"""인력 줄 — 열 한 벌(차례까지 같음) · 상태 값 · 옛이름 목록."""
out = []
if tuple(row) != LABOR_COLS:
if _cols_of(row) != LABOR_COLS:
out.append(f"{where} · 열이 한 벌이 아님 — 「{' · '.join(LABOR_COLS)}」")
if row.get("상태") not in LABOR_STATUS:
out.append(f"{where} · 상태 「{row.get('상태')}」 — {' · '.join(LABOR_STATUS)} 아님")