8000 Merge pull request #6944 from Neradoc/doc-fix-usb-cdc · adafruit/circuitpython@1c8e126 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c8e126

Browse files
authored
Merge pull request #6944 from Neradoc/doc-fix-usb-cdc
docs: usb_cdc.Serial.readinto has no nbytes parameter
2 parents d2bc5eb + 645cb6c commit 1c8e126

File tree

5 files changed

+16
-21
lines changed

5 files changed

+16
-21
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff li 8000 ne numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
- name: Set up Python 3
221221
uses: actions/setup-python@v2
222222
with:
223-
python-version: "3.x"
223+
python-version: "3.10.6"
224224
- name: Install dependencies
225225
run: |
226226
sudo apt-get update

ports/raspberrypi/bindings/rp2pio/StateMachine.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,8 @@ STATIC mp_obj_t rp2pio_statemachine_obj_stop_background_write(mp_obj_t self_in)
521521
}
522522
MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_stop_background_write_obj, rp2pio_statemachine_obj_stop_background_write);
523523

524-
//| @property
525-
//| def writing(self) -> bool:
526-
//| """Returns True if a background write is in progress"""
524+
//| writing: bool
525+
//| """Returns True if a background write is in progress"""
527526
//|
528527
STATIC mp_obj_t rp2pio_statemachine_obj_get_writing(mp_obj_t self_in) {
529528
rp2pio_statemachine_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -539,11 +538,10 @@ const mp_obj_property_t rp2pio_statemachine_writing_obj = {
539538
};
540539

541540

542-
//| @property
543-
//| def pending(self) -> int:
544-
//| """Returns the number of pending buffers for background writing.
541+
//| pending: int
542+
//| """Returns the number of pending buffers for background writing.
545543
//|
546-
//| If the number is 0, then a `StateMachine.background_write` call will not block."""
544+
//| If the number is 0, then a `StateMachine.background_write` call will not block."""
547545
//|
548546
STATIC mp_obj_t rp2pio_statemachine_obj_get_pending(mp_obj_t self_in) {
549547
rp2pio_statemachine_obj_t *self = MP_OBJ_TO_PTR(self_in);

requirements-doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ setuptools>=45
99
setuptools_scm
1010

1111
# For sphinx
12-
sphinx>=4.0.0
12+
sphinx!=5.2.0.post0
1313
sphinx-autoapi
1414
sphinx-rtd-theme
1515
sphinxcontrib-svg2pdfconverter

shared-bindings/sdioio/SDCard.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,9 @@ STATIC mp_obj_t sdioio_sdcard_writeblocks(mp_obj_t self_in, mp_obj_t start_block
201201

202202
MP_DEFINE_CONST_FUN_OBJ_3(sdioio_sdcard_writeblocks_obj, sdioio_sdcard_writeblocks);
203203

204-
//| @property
205-
//| def frequency(self) -> int:
206-
//| """The actual SDIO bus frequency. This may not match the frequency
207-
//| requested due to internal limitations."""
208-
//| ...
204+
//| frequency: int
205+
//| """The actual SDIO bus frequency. This may not match the frequency
206+
//| requested due to internal limitations."""
209207
//|
210208
STATIC mp_obj_t sdioio_sdcard_obj_get_frequency(mp_obj_t self_in) {
211209
sdioio_sdcard_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -217,10 +215,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_get_frequency_obj, sdioio_sdcard_obj_get
217215
MP_PROPERTY_GETTER(sdioio_sdcard_frequency_obj,
218216
(mp_obj_t)&sdioio_sdcard_get_frequency_obj);
219217

220-
//| @property
221-
//| def width(self) -> int:
222-
//| """The actual SDIO bus width, in bits"""
223-
//| ...
218+
//| width:int
219+
//| """The actual SDIO bus width, in bits"""
224220
//|
225221
STATIC mp_obj_t sdioio_sdcard_obj_get_width(mp_obj_t self_in) {
226222
sdioio_sdcard_obj_t *self = MP_OBJ_TO_PTR(self_in);

shared-bindings/usb_cdc/Serial.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@
5454
//| ...
5555
//|
5656
//| def readinto(self, buf: WriteableBuffer) -> int:
57-
//| """Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
58-
//| that many bytes, subject to `timeout`. Otherwise, read at most ``len(buf)`` bytes.
57+
//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes. If `timeout`
58+
//| is > 0 or ``None``, keep waiting until the timeout expires or ``len(buf)``
59+
//| bytes are available.
5960
//|
6061
//| :return: number of bytes read and stored into ``buf``
61-
//| :rtype: bytes"""
62+
//| :rtype: int"""
6263
//| ...
6364
//|
6465
//| def readline(self, size: int = -1) -> Optional[bytes]:

0 commit comments

Comments
 (0)
0