@@ -275,18 +275,23 @@ static PyObject* PyXmlSec_PyIORegisterDefaultCallbacks(PyObject *self) {
275275}
276276
277277static char PyXmlSec_PyIORegisterCallbacks__doc__ [] = \
278+ "register_callbacks(input_match_callback, input_open_callback, input_read_callback, input_close_callback) -> None\n"
278279 "Register globally a custom set of IO callbacks with xmlsec.\n\n"
279- ":param callable input_match_callback: A callable that takes a filename `bytestring` and "
280+ ":param input_match_callback: A callable that takes a filename `bytestring` and "
280281 "returns a boolean as to whether the other callbacks in this set can handle that name.\n"
281- ":param callable input_open_callback: A callable that takes a filename and returns some "
282+ ":type input_match_callback: ~collections.abc.Callable[[bytes], bool]\n"
283+ ":param input_open_callback: A callable that takes a filename and returns some "
282284 "context object (e.g. a file object) that the remaining callables in this set will be passed "
283285 "during handling.\n"
286+ ":type input_open_callback: ~collections.abc.Callable[[bytes], Any]\n"
284287 // FIXME: How do we handle failures in ^^ (e.g. can't find the file)?
285- ":param callable input_read_callback: A callable that that takes the context object from the "
288+ ":param input_read_callback: A callable that that takes the context object from the "
286289 "open callback and a buffer, and should fill the buffer with data (e.g. BytesIO.readinto()). "
287290 "xmlsec will call this function several times until there is no more data returned.\n"
288- ":param callable input_close_callback: A callable that takes the context object from the "
291+ ":type input_read_callback: ~collections.abc.Callable[[Any, memoryview], int]\n"
292+ ":param input_close_callback: A callable that takes the context object from the "
289293 "open callback and can do any resource cleanup necessary.\n"
294+ ":type input_close_callback: ~collections.abc.Callable[[Any], None]\n"
290295 ;
291296static PyObject * PyXmlSec_PyIORegisterCallbacks (PyObject * self , PyObject * args , PyObject * kwargs ) {
292297 static char * kwlist [] = {
0 commit comments