MCPcopy Create free account
hub / github.com/deepnote/deepnote / main

Function main

packages/reactivity/src/scripts/ast-analyzer.py:432–456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

430
431
432def main():
433 parser = argparse.ArgumentParser(description="Analyze AST of Python and SQL blocks")
434 parser.add_argument("--input", required=True, help="JSON input file path")
435 parser.add_argument("--output", required=True, help="JSON output file path")
436
437 args = parser.parse_args()
438
439 try:
440 # Read input data from file
441 with open(args.input, "r") as f:
442 data = json.load(f)
443
444 blocks = comment_out_jupyter_bash_commands(data["blocks"])
445 result = analyze_blocks(blocks)
446
447 # Write output data to file
448 with open(args.output, "w") as f:
449 json.dump(result, f)
450
451 except Exception as e:
452 error_result = {"errorMessage": f"{e.__class__.__name__}: {str(e)}"}
453 # Write error to output file
454 with open(args.output, "w") as f:
455 json.dump(error_result, f)
456 sys.exit(1)
457
458
459if __name__ == "__main__":

Callers 1

ast-analyzer.pyFile · 0.70

Calls 2

analyze_blocksFunction · 0.85

Tested by

no test coverage detected