The argument list for those Python method declarations that can grow too wide is always "PyObject *self, PyObject *args"; simply break that fixed arg list to a new line. Effect demonstrated on the longest line in "python/methods.h":
-extern PyObject *nbd_internal_py_aio_connect_systemd_socket_activation (PyObject *self, PyObject *args); +extern PyObject *nbd_internal_py_aio_connect_systemd_socket_activation ( + PyObject *self, PyObject *args + );
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- generator/Python.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generator/Python.ml b/generator/Python.ml index d493f17a5d6a..87444c54bdf0 100644 --- a/generator/Python.ml +++ b/generator/Python.ml @@ -70,8 +70,9 @@ let List.iter ( fun name -> - pr "extern PyObject *nbd_internal_py_%s (PyObject *self, PyObject *args);\n" - name; + pr "extern PyObject *nbd_internal_py_%s (\n" name; + pr " PyObject *self, PyObject *args\n"; + pr " );\n" ) ([ "create"; "close"; "display_version"; "alloc_aio_buffer";