diff --git a/python/_tskitmodule.c b/python/_tskitmodule.c index dabf0db2a4..0d89a677dc 100644 --- a/python/_tskitmodule.c +++ b/python/_tskitmodule.c @@ -13254,10 +13254,13 @@ LsHmm_forward_matrix(LsHmm *self, PyObject *args) PyExc_ValueError, "haplotype array must have dimension (num_sites,)"); goto out; } + // clang-format off Py_BEGIN_ALLOW_THREADS err = tsk_ls_hmm_forward(self->ls_hmm, PyArray_DATA(haplotype_array), compressed_matrix->compressed_matrix, TSK_NO_INIT); - Py_END_ALLOW_THREADS if (err != 0) + Py_END_ALLOW_THREADS + // clang-format on + if (err != 0) { handle_library_error(err); goto out;