@@ -275,18 +275,23 @@ static PyObject* PyXmlSec_PyIORegisterDefaultCallbacks(PyObject *self) {
275
275
}
276
276
277
277
static char PyXmlSec_PyIORegisterCallbacks__doc__ [] = \
278
+ "register_callbacks(input_match_callback, input_open_callback, input_read_callback, input_close_callback) -> None\n"
278
279
"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 "
280
281
"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 "
282
284
"context object (e.g. a file object) that the remaining callables in this set will be passed "
283
285
"during handling.\n"
286
+ ":type input_open_callback: ~collections.abc.Callable[[bytes], Any]\n"
284
287
// 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 "
286
289
"open callback and a buffer, and should fill the buffer with data (e.g. BytesIO.readinto()). "
287
290
"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 "
289
293
"open callback and can do any resource cleanup necessary.\n"
294
+ ":type input_close_callback: ~collections.abc.Callable[[Any], None]\n"
290
295
;
291
296
static PyObject * PyXmlSec_PyIORegisterCallbacks (PyObject * self , PyObject * args , PyObject * kwargs ) {
292
297
static char * kwlist [] = {
0 commit comments