Skip to content

Commit 5770312

Browse files
lmeyerovclaude
andcommitted
refactor(gfql/row): collapse duplicate ValueError in _gfql_resolve_token
Wave 4 finding D1 (SUGGESTION): the conditional at pipeline.py:2310 and the raise at pipeline.py:2312 produce identical errors. After the node-id branch (lines 2306-2309) returns, the only remaining outcome is "unsupported token", regardless of edge_aliases membership — both branches raised the same f-string. Collapsed to a single raise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent de0132f commit 5770312

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

graphistry/compute/gfql/row/pipeline.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,8 +2307,6 @@ def _gfql_resolve_token(self, table_df: Any, token: str) -> Any:
23072307
id_col = f"{txt}.{node_id}" if node_id else None
23082308
if id_col is not None and id_col in table_df.columns:
23092309
return table_df[id_col]
2310-
if edge_aliases is not None and txt not in edge_aliases:
2311-
raise ValueError(f"unsupported token in row expression: {token!r}")
23122310
raise ValueError(f"unsupported token in row expression: {token!r}")
23132311
raise ValueError(f"unsupported token in row expression: {token!r}")
23142312

0 commit comments

Comments
 (0)