File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,6 @@ namespace xpyt
249249 nl::json interpreter::is_complete_request_impl (const std::string& code)
250250 {
251251 py::gil_scoped_acquire acquire;
252- nl::json kernel_res;
253252
254253 py::object transformer_manager = py::getattr (m_ipython_shell, " input_transformer_manager" , py::none ());
255254 if (transformer_manager.is_none ())
@@ -258,14 +257,15 @@ namespace xpyt
258257 }
259258
260259 py::list result = transformer_manager.attr (" check_complete" )(code);
261- auto status = result[0 ].cast <std::string>();
260+ std::string status = result[0 ].cast <std::string>();
261+ std::string indent;
262262
263- kernel_res[" status" ] = status;
264- if (status.compare (" incomplete" ) == 0 )
263+ if (status == " incomplete" )
265264 {
266- kernel_res[ " indent" ] = std::string (result[1 ].cast <std::size_t >(), ' ' );
265+ indent = std::string (result[1 ].cast <std::size_t >(), ' ' );
267266 }
268- return kernel_res;
267+
268+ return xeus::create_is_complete_reply (status, indent);
269269 }
270270
271271 nl::json interpreter::kernel_info_request_impl ()
Original file line number Diff line number Diff line change @@ -273,9 +273,7 @@ namespace xpyt
273273
274274 nl::json raw_interpreter::is_complete_request_impl (const std::string&)
275275 {
276- nl::json result;
277- result[" status" ] = " complete" ;
278- return result;
276+ return xeus::create_is_complete_reply (" complete" , " " );
279277 }
280278
281279 nl::json raw_interpreter::kernel_info_request_impl ()
You can’t perform that action at this time.
0 commit comments