fix(M02): 구조물집계표 길이 = 구간형은 시작~종료 먼저(87-2)
- 옛 length_m 이 앞서 범위를 고쳐도 집계 길이가 안 따라오던 흠 고침 · 점형은 입력 길이 그대로 - 시험: test_m02_table_fill 길이 우선순위 하나 더함 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
This commit is contained in:
@@ -194,11 +194,11 @@ def _label(key: str, value: Any) -> str:
|
||||
|
||||
|
||||
def _length(item: dict[str, Any]) -> float | None:
|
||||
stated = _number(item["options"].get("length_m"))
|
||||
if stated:
|
||||
return stated
|
||||
# 구간형은 시작~종료가 먼저(노면공 87-2) — 옛 length_m 은 범위를 고쳐도 안 따라옴
|
||||
start, end = _number(item.get("start_m")), _number(item.get("end_m"))
|
||||
return abs(end - start) if start is not None and end is not None else None
|
||||
if start is not None and end is not None:
|
||||
return abs(end - start)
|
||||
return _number(item["options"].get("length_m")) or None
|
||||
|
||||
|
||||
def _source_value(source: dict[str, Any], item: dict[str, Any]) -> float | None:
|
||||
|
||||
Reference in New Issue
Block a user