Skip to content

Commit be39824

Browse files
committed
DictItem is not indexable
1 parent f502f77 commit be39824

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/axiomatic/axtract/axtract_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def create_report(report_data: EquationExtractionResponse, report_path: str = ".
247247
for symbol in eq.latex_symbols:
248248
html_content += f"""
249249
<tr>
250-
<td>\\({symbol["key"]}\\)</td>
251-
<td>{symbol["value"]}</td>
250+
<td>\\({symbol.key}\\)</td>
251+
<td>{symbol.key}</td>
252252
</tr>
253253
"""
254254

src/axiomatic/axtract/interactive_table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _create_variable_dict(equation_response: EquationExtractionResponse) -> dict
408408
for equation in equation_response.equations:
409409
for symbol in equation.latex_symbols:
410410
# Only add if not already present (avoid duplicates)
411-
if symbol['key'] not in variable_dict:
412-
variable_dict[symbol['key']] = {"name": symbol['value']}
411+
if symbol.key not in variable_dict:
412+
variable_dict[symbol.key] = {"name": symbol.key}
413413

414414
return variable_dict

src/axiomatic/axtract/relation_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def generate_relation_graph(equations: List[EquationExtraction]) -> str:
5858
# Add variable nodes and edges
5959
for symbol in eq.latex_symbols:
6060
# Normalize the variable name
61-
var_name = normalize_latex_symbol(symbol["key"])
61+
var_name = normalize_latex_symbol(symbol.key)
6262
if var_name not in all_variables:
6363
net.add_node(
6464
var_name,
@@ -67,7 +67,7 @@ def generate_relation_graph(equations: List[EquationExtraction]) -> str:
6767
shape="dot",
6868
size=20,
6969
font=dict(size=16, color="#000000"),
70-
title=f"{var_name}: {symbol['value']}",
70+
title=f"{var_name}: {symbol.value}",
7171
)
7272
all_variables.add(var_name)
7373

0 commit comments

Comments
 (0)