(data, path, mode="a",encoding='utf-8')
| 116 | return None |
| 117 | |
| 118 | def write_jsonl(data, path, mode="a",encoding='utf-8'): |
| 119 | with open(path, mode, encoding=encoding) as f: |
| 120 | for d in data: |
| 121 | f.write(json.dumps(d, ensure_ascii=False) + "\n") |
| 122 | def write_jsonl_force(data, path, mode="w+",encoding='utf-8'): |
| 123 | with open(path, mode, encoding=encoding) as f: |
| 124 | for d in data: |
no test coverage detected