import openpulse
p = "cal{{1;2;}}"
openpulse.parse(p)
# Program(span=Span(start_line=1, start_column=0, end_line=1, end_column=10),
# statements=[CalibrationStatement(span=Span(start_line=1, start_column=0, end_line=1,
# end_column=10), annotations=[], body=[])], version=None)
Here is an MVE:
Please note that
body=[]Removing the cal block returns the expected results
..., body=CompoundStatement{...})....