Fill test gaps from PR #890 and fix case-insensitive path in _is_json_key_node

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Safi
2026-05-16 14:27:01 +01:00
co-authored by Claude Sonnet 4.6
parent aa541a680a
commit 766566f6a8
2 changed files with 63 additions and 2 deletions
+3 -2
View File
@@ -72,10 +72,11 @@ _JSON_NOISE_LABELS: frozenset[str] = frozenset({
def _is_json_key_node(G: nx.Graph, node_id: str) -> bool:
src = G.nodes[node_id].get("source_file", "")
attrs = G.nodes[node_id]
src = (attrs.get("source_file") or "").lower()
if not src.endswith(".json"):
return False
label = G.nodes[node_id].get("label", "").lower().strip()
label = (attrs.get("label") or "").strip().lower()
return label in _JSON_NOISE_LABELS