(filename, figure)
| 97 | # |
| 98 | |
| 99 | def update_file(filename, figure): |
| 100 | lines = read_file(filename) |
| 101 | f_json = figure.to_json(pretty=True).replace('\n', '\n ') |
| 102 | out = lines[:6] + [f' {f_json}\n', ' )\n', '};\n'] |
| 103 | write_to_file(filename, out) |
| 104 | |
| 105 | |
| 106 | def read_file(filename): |
no test coverage detected