MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / compile_python_buffer_error

Function compile_python_buffer_error

src/python/runner.cpp:352–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 1

format_python_code_implFunction · 0.85

Calls 2

c_strMethod · 0.80

Tested by

no test coverage detected