fix: resolve CI/CD issues - remove unused imports and fix type mismatches
Some checks failed
CI / test (push) Failing after 49s
CI / build (push) Has been skipped

This commit is contained in:
2026-02-02 02:56:14 +00:00
parent a91b3dafa0
commit 0f6bb5db46

View File

@@ -76,16 +76,16 @@ def analyze(
console.print(f"Graph contains {len(nodes)} nodes")
if format == "dot":
exporter = DOTExporter(graph_builder)
content = exporter.get_string()
dot_exporter = DOTExporter(graph_builder)
content = dot_exporter.get_string()
if output:
Path(output).write_text(content)
console.print(f"Exported DOT to: {output}")
else:
console.print(content)
elif format == "json":
exporter = JSONExporter(graph_builder)
content = exporter.get_string()
json_exporter = JSONExporter(graph_builder)
content = json_exporter.get_string()
if output:
Path(output).write_text(content)
console.print(f"Exported JSON to: {output}")
@@ -93,8 +93,8 @@ def analyze(
console.print(content)
elif format == "png":
if output:
exporter = PNGExporter(graph_builder)
exporter.export(Path(output))
png_exporter = PNGExporter(graph_builder)
png_exporter.export(Path(output))
console.print(f"Exported PNG to: {output}")
else:
console.print("[red]Error: PNG format requires output file path[/red]")
@@ -247,14 +247,14 @@ def export(ctx: click.Context, path: str, language: str, output: str):
graph_builder.build_from_parser_results(results)
if output_path.suffix == ".dot":
exporter = DOTExporter(graph_builder)
exporter.export(output_path)
dot_exporter = DOTExporter(graph_builder)
dot_exporter.export(output_path)
elif output_path.suffix == ".json":
exporter = JSONExporter(graph_builder)
exporter.export(output_path)
json_exporter = JSONExporter(graph_builder)
json_exporter.export(output_path)
elif output_path.suffix in [".png", ".svg"]:
exporter = PNGExporter(graph_builder)
exporter.export(output_path, format=output_path.suffix[1:])
png_exporter = PNGExporter(graph_builder)
png_exporter.export(output_path, format=output_path.suffix[1:])
else:
console.print(f"[red]Unsupported output format: {output_path.suffix}[/red]")
return