Skip to content

Commit 8e201d5

Browse files
committed
better document constructor arguments
1 parent 2e8eb43 commit 8e201d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

shared-bindings/qrio/QRDecoder.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@
3535
//| class QRDecoder:
3636
//|
3737
//| def __init__(self, width: int, height: int) -> None:
38-
//| """Construct a QRDecoder object"""
38+
//| """Construct a QRDecoder object
3939
//|
40+
//| :param int width: The pixel width of the image to decode
41+
//| :param int height: The pixel height of the image to decode
42+
//| """
43+
//| ...
4044

4145
STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
4246
enum { ARG_width, ARG_height };
@@ -55,7 +59,7 @@ STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args
5559
}
5660

5761
//| def decode(self, buffer: ReadableBuffer, pixel_policy: PixelPolicy = PixelPolicy.EVERY_BYTE) -> List[QRInfo]:
58-
//| """Decode zero or more QR codes from the given image"""
62+
//| """Decode zero or more QR codes from the given image. The size of the buffer must be at least ``length``×``width`` bytes for `EVERY_BYTE`, and 2×``length``×``width`` bytes for `EVEN_BYTES` or `ODD_BYTES`."""
5963
//|
6064
STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
6165
qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);

0 commit comments

Comments
 (0)