@@ -542,7 +542,8 @@ static void *Producer_purge (Handle *self, PyObject *args,
542542 rd_kafka_resp_err_t err ;
543543 static char * kws [] = { "in_queue" , "in_flight" , "blocking" , NULL };
544544
545- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|bbb" , kws , & in_queue , & in_flight , & blocking ))
545+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|bbb" , kws ,
546+ & in_queue , & in_flight , & blocking ))
546547 return NULL ;
547548 if (in_queue )
548549 purge_strategy = RD_KAFKA_PURGE_F_QUEUE ;
@@ -554,7 +555,8 @@ static void *Producer_purge (Handle *self, PyObject *args,
554555 err = rd_kafka_purge (self -> rk , purge_strategy );
555556
556557 if (err ) {
557- cfl_PyErr_Format (err , "Purge failed: %s" , rd_kafka_err2str (err ));
558+ cfl_PyErr_Format (err , "Purge failed: %s" ,
559+ rd_kafka_err2str (err ));
558560 return NULL ;
559561 }
560562
@@ -632,12 +634,13 @@ static PyMethodDef Producer_methods[] = {
632634 "\n"
633635 " Purge messages currently handled by the producer instance.\n"
634636 " The application will need to call poll() or flush() "
635- "afterwards to serve the delivery report callbacks of the purged messages."
637+ "afterwards to serve the delivery report callbacks of the purged messages.\n "
636638 "\n"
637639 " :param: bool in_queue: Purge messages from internal queues. By default, true.\n"
638640 " :param: bool in_flight: Purge messages in flight to or from the broker. By default, true.\n"
639- " :param: bool blocking: If set to False, will not wait on background thread queue\n"
640- "purging to finish. By default, true."
641+ " :param: bool blocking: If set to False, will not wait on background thread queue "
642+ "purging to finish. By default, true.\n"
643+ "\n"
641644 },
642645 { "list_topics" , (PyCFunction )list_topics , METH_VARARGS |METH_KEYWORDS ,
643646 list_topics_doc
0 commit comments