refactor(manifest): drop dead _load_json_or_die helper
It had no callers — a leftover from the pre-PRD-0011 bot-bottle.json loader (the manifest is per-file Markdown now). Removing it also drops the now-unused `json` import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit was merged in pull request #102.
This commit is contained in:
@@ -44,7 +44,6 @@ on-disk files.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import ipaddress
|
import ipaddress
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from dataclasses import dataclass, field, replace
|
from dataclasses import dataclass, field, replace
|
||||||
@@ -969,15 +968,6 @@ def _section_dict(value: object, label: str) -> dict[str, object]:
|
|||||||
return _as_json_object(value, label)
|
return _as_json_object(value, label)
|
||||||
|
|
||||||
|
|
||||||
def _load_json_or_die(path: Path) -> dict[str, object]:
|
|
||||||
try:
|
|
||||||
with path.open() as f:
|
|
||||||
doc: object = json.load(f)
|
|
||||||
except json.JSONDecodeError:
|
|
||||||
raise ManifestError(f"bot-bottle.json at {path} is not valid JSON")
|
|
||||||
return _as_json_object(doc, f"bot-bottle.json at {path}")
|
|
||||||
|
|
||||||
|
|
||||||
def _opt_str(value: object, label: str) -> str:
|
def _opt_str(value: object, label: str) -> str:
|
||||||
if value is None:
|
if value is None:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user