diff options
author | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-05-08 13:02:05 +0100 |
---|---|---|
committer | Cosimo Lupo <cosimo.lupo@daltonmaag.com> | 2015-05-11 10:39:24 +0100 |
commit | 3351bb08e3458a21c30be39ef1448c5f9bdc976e (patch) | |
tree | 481f3c668ba7327a401ce088501e7545e3125272 /python | |
parent | 6d935db75c7d333aec5d491a1ae8516144953f97 (diff) | |
download | brotli-3351bb08e3458a21c30be39ef1448c5f9bdc976e.zip brotli-3351bb08e3458a21c30be39ef1448c5f9bdc976e.tar.gz brotli-3351bb08e3458a21c30be39ef1448c5f9bdc976e.tar.bz2 |
[brotlimodule] apply uniform docstring style
Diffstat (limited to 'python')
-rw-r--r-- | python/brotlimodule.cc | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index b84bb49..5be424e 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -75,12 +75,15 @@ static int lgblock_convertor(PyObject *o, int *lgblock) { } PyDoc_STRVAR(compress__doc__, -"compress(data, mode=MODE_TEXT, quality=11, lgwin=22, lgblock=0,\n" -" enable_dictionary=True, enable_transforms=False\n" -" greedy_block_split=False, enable_context_modeling=True)\n" +"Compress a byte string.\n" +"\n" +"Signature:\n" +" compress(string, mode=MODE_TEXT, quality=11, lgwin=22, lgblock=0,\n" +" enable_dictionary=True, enable_transforms=False\n" +" greedy_block_split=False, enable_context_modeling=True)\n" "\n" "Args:\n" -" data (bytes): The input data.\n" +" string (bytes): The input data.\n" " mode (int, optional): The compression mode can be MODE_TEXT (default) or\n" " MODE_FONT.\n" " quality (int, optional): Controls the compression-speed vs compression-\n" @@ -101,7 +104,7 @@ PyDoc_STRVAR(compress__doc__, " modeling. Defaults to True. Respected only if quality > 9.\n" "\n" "Returns:\n" -" The compressed string of bytes.\n" +" The compressed byte string.\n" "\n" "Raises:\n" " brotli.error: If arguments are invalid, or compressor fails.\n"); @@ -120,7 +123,7 @@ static PyObject* brotli_compress(PyObject *self, PyObject *args, PyObject *keywd int lgblock = -1; int ok; - static char *kwlist[] = {"data", "mode", "quality", "lgwin", "lgblock", + static char *kwlist[] = {"string", "mode", "quality", "lgwin", "lgblock", "enable_dictionary", "enable_transforms", "greedy_block_split", "enable_context_modeling", NULL}; @@ -179,7 +182,19 @@ int output_callback(void* data, const uint8_t* buf, size_t count) { } PyDoc_STRVAR(decompress__doc__, -"decompress(string) -- Return decompressed string."); +"Decompress a compressed byte string.\n" +"\n" +"Signature:\n" +" decompress(string)\n" +"\n" +"Args:\n" +" string (bytes): The compressed input data.\n" +"\n" +"Returns:\n" +" The decompressed byte string.\n" +"\n" +"Raises:\n" +" brotli.error: If decompressor fails.\n"); static PyObject* brotli_decompress(PyObject *self, PyObject *args) { PyObject *ret = NULL; @@ -217,10 +232,7 @@ static PyMethodDef brotli_methods[] = { PyDoc_STRVAR(brotli__doc__, "The functions in this module allow compression and decompression using the\n" -"Brotli library.\n" -"\n" -"compress(string[, mode, transform]) -- Compress string.\n" -"decompress(string) -- Decompresses a compressed string.\n"); +"Brotli library.\n\n"); #if PY_MAJOR_VERSION >= 3 #define INIT_BROTLI PyInit_brotli |