| 350 | } |
| 351 | |
| 352 | std::string compile_python_buffer_error(const std::string& code) { |
| 353 | PyObject* const compiled = Py_CompileString(code.c_str(), "<lfs_formatter>", Py_file_input); |
| 354 | if (compiled) { |
| 355 | Py_DECREF(compiled); |
| 356 | return {}; |
| 357 | } |
| 358 | |
| 359 | return "Python syntax error: " + consume_python_error_detailed(); |
| 360 | } |
| 361 | |
| 362 | void remember_python_bridge_failure(const std::string& detail) { |
| 363 | bool expected = false; |
no test coverage detected