From cf490a70917a1b2d38ba9b58e763e0837d0f7ca7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 3 Oct 2023 11:24:50 +1100 Subject: [PATCH] all: Fix various spelling mistakes found by codespell 2.2.6. Signed-off-by: Damien George --- docs/library/espnow.rst | 2 +- docs/library/wm8960.rst | 2 +- docs/reference/glossary.rst | 2 +- examples/hwapi/README.md | 2 +- extmod/modbluetooth.c | 2 +- extmod/nimble/modbluetooth_nimble.c | 2 +- ports/cc3200/application.lds | 2 +- ports/cc3200/fatfs/src/drivers/sd_diskio.c | 2 +- ports/nrf/Makefile | 2 +- ports/nrf/drivers/bluetooth/ble_drv.c | 2 +- ports/stm32/Makefile | 2 +- ports/stm32/timer.c | 2 +- ports/teensy/Makefile | 2 +- ports/teensy/timer.c | 2 +- py/formatfloat.c | 2 +- py/mkrules.mk | 2 +- py/mpconfig.h | 6 +++--- py/obj.c | 2 +- pyproject.toml | 2 +- tools/pydfu.py | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/library/espnow.rst b/docs/library/espnow.rst index f344983700..f0b592dffc 100644 --- a/docs/library/espnow.rst +++ b/docs/library/espnow.rst @@ -287,7 +287,7 @@ after reboot/reset). This reduces the reliability of receiving ESP-NOW messages .. method:: ESPNow.irecv([timeout_ms]) - Works like `ESPNow.recv()` but will re-use internal bytearrays to store the + Works like `ESPNow.recv()` but will reuse internal bytearrays to store the return values: ``[mac, msg]``, so that no new memory is allocated on each call. diff --git a/docs/library/wm8960.rst b/docs/library/wm8960.rst index add003630e..5abfb6a8a0 100644 --- a/docs/library/wm8960.rst +++ b/docs/library/wm8960.rst @@ -251,7 +251,7 @@ controlling its operation: .. method:: WM8960.expand_3d(level) - Enable Stereo 3D exansion. *level* is a number between 0 and 15. + Enable Stereo 3D expansion. *level* is a number between 0 and 15. A value of 0 disables the expansion. .. method:: WM8960.mono(active) diff --git a/docs/reference/glossary.rst b/docs/reference/glossary.rst index d039bf7132..efaa8f607f 100644 --- a/docs/reference/glossary.rst +++ b/docs/reference/glossary.rst @@ -32,7 +32,7 @@ Glossary callee-owned tuple This is a MicroPython-specific construct where, for efficiency - reasons, some built-in functions or methods may re-use the same + reasons, some built-in functions or methods may reuse the same underlying tuple object to return data. This avoids having to allocate a new tuple for every call, and reduces heap fragmentation. Programs should not hold references to callee-owned tuples and instead only diff --git a/examples/hwapi/README.md b/examples/hwapi/README.md index a1b0c5642a..929ef425fd 100644 --- a/examples/hwapi/README.md +++ b/examples/hwapi/README.md @@ -3,7 +3,7 @@ This directory shows the best practices for using MicroPython hardware API across various boards, with the aim to enable writing portable applications, which would work from a board to board, from a system to another systems. This is inherently a hard problem, because hardware is different from one -board type to another, and even from examplar of board to another. For +board type to another, and even from exemplar of board to another. For example, if your app requires an external LED, one user may connect it to one GPIO pin, while another user may find it much more convenient to use another pin. This of course applies to relays, buzzers, sensors, etc. diff --git a/extmod/modbluetooth.c b/extmod/modbluetooth.c index 7b13f9556c..3417df7a27 100644 --- a/extmod/modbluetooth.c +++ b/extmod/modbluetooth.c @@ -504,7 +504,7 @@ STATIC int bluetooth_gatts_register_service(mp_obj_t uuid_in, mp_obj_t character // How many descriptors in the flattened list per characteristic. uint8_t *num_descriptors = m_new(uint8_t, len); - // Inititally allocate enough room for the number of characteristics. + // Initially allocate enough room for the number of characteristics. // Will be grown to accommodate descriptors as necessary. *num_handles = len; *handles = m_new(uint16_t, *num_handles); diff --git a/extmod/nimble/modbluetooth_nimble.c b/extmod/nimble/modbluetooth_nimble.c index e23ffbf0f9..5e3e38ea67 100644 --- a/extmod/nimble/modbluetooth_nimble.c +++ b/extmod/nimble/modbluetooth_nimble.c @@ -1856,7 +1856,7 @@ int mp_bluetooth_l2cap_recvinto(uint16_t conn_handle, uint16_t cid, uint8_t *buf // re-enable receiving yet (as we need to complete the rest of IRQ handler first). if (!chan->irq_in_progress) { // We've already given the channel a new mbuf in l2cap_channel_event above, so - // re-use that mbuf in the call to ble_l2cap_recv_ready. This will just + // reuse that mbuf in the call to ble_l2cap_recv_ready. This will just // give the channel more credits. struct os_mbuf *sdu_rx = chan->chan->coc_rx.sdu; assert(sdu_rx); diff --git a/ports/cc3200/application.lds b/ports/cc3200/application.lds index 3f5e72f8bd..2d7dd04621 100644 --- a/ports/cc3200/application.lds +++ b/ports/cc3200/application.lds @@ -83,7 +83,7 @@ SECTIONS } > SRAM /* place here functions that are only called during boot up, */ - /* that way, we can re-use this area for the MicroPython heap */ + /* that way, we can reuse this area for the MicroPython heap */ .boot : { . = ALIGN(8); diff --git a/ports/cc3200/fatfs/src/drivers/sd_diskio.c b/ports/cc3200/fatfs/src/drivers/sd_diskio.c index 329ae04b99..e370ba538f 100644 --- a/ports/cc3200/fatfs/src/drivers/sd_diskio.c +++ b/ports/cc3200/fatfs/src/drivers/sd_diskio.c @@ -363,7 +363,7 @@ DRESULT sd_disk_read (BYTE* pBuffer, DWORD ulSectorNumber, UINT SectorCount) { //***************************************************************************** // -//! Wrties sector(s) to the disk drive. +//! Writes sector(s) to the disk drive. //! //! //! This function writes specified number of sectors to the drive diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 5e9e31ad01..284b82281b 100644 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -536,7 +536,7 @@ SRC_QSTR += $(SRC_C) $(SRC_SHARED_C) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) # SRC_QSTR SRC_QSTR_AUTO_DEPS += -# Making OBJ use an order-only depenedency on the generated pins.h file +# Making OBJ use an order-only dependency on the generated pins.h file # has the side effect of making the pins.h file before we actually compile # any of the objects. The normal dependency generation will deal with the # case when pins.h is modified. But when it doesn't exist, we don't know diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c index 078c7d995b..b1caa187d5 100644 --- a/ports/nrf/drivers/bluetooth/ble_drv.c +++ b/ports/nrf/drivers/bluetooth/ble_drv.c @@ -942,7 +942,7 @@ static void sd_evt_handler(uint32_t evt_id) { break; } #if MICROPY_HW_USB_CDC - // Farward SOC events to USB CDC driver. + // Forward SOC events to USB CDC driver. usb_cdc_sd_event_handler(evt_id); #endif } diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile index 58dc762006..dcfc8dfd54 100644 --- a/ports/stm32/Makefile +++ b/ports/stm32/Makefile @@ -664,7 +664,7 @@ SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C) # SRC_QSTR SRC_QSTR_AUTO_DEPS += $(GEN_CDCINF_HEADER) -# Making OBJ use an order-only depenedency on the generated pins.h file +# Making OBJ use an order-only dependency on the generated pins.h file # has the side effect of making the pins.h file before we actually compile # any of the objects. The normal dependency generation will deal with the # case when pins.h is modified. But when it doesn't exist, we don't know diff --git a/ports/stm32/timer.c b/ports/stm32/timer.c index 5f2e213a0a..c15b84fe54 100644 --- a/ports/stm32/timer.c +++ b/ports/stm32/timer.c @@ -605,7 +605,7 @@ STATIC void pyb_timer_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ /// - `mode` can be one of: /// - `Timer.UP` - configures the timer to count from 0 to ARR (default) /// - `Timer.DOWN` - configures the timer to count from ARR down to 0. -/// - `Timer.CENTER` - confgures the timer to count from 0 to ARR and +/// - `Timer.CENTER` - configures the timer to count from 0 to ARR and /// then back down to 0. /// /// - `div` can be one of 1, 2, or 4. Divides the timer clock to determine diff --git a/ports/teensy/Makefile b/ports/teensy/Makefile index 70331c5dc7..8f55e4bcba 100644 --- a/ports/teensy/Makefile +++ b/ports/teensy/Makefile @@ -214,7 +214,7 @@ SRC_QSTR += $(SRC_C) $(STM_SRC_C) $(SHARED_SRC_C) # SRC_QSTR SRC_QSTR_AUTO_DEPS += -# Making OBJ use an order-only depenedency on the generated pins.h file +# Making OBJ use an order-only dependency on the generated pins.h file # has the side effect of making the pins.h file before we actually compile # any of the objects. The normal dependency generation will deal with the # case when pins.h is modified. But when it doesn't exist, we don't know diff --git a/ports/teensy/timer.c b/ports/teensy/timer.c index 56d25e3312..da18d6f4f5 100644 --- a/ports/teensy/timer.c +++ b/ports/teensy/timer.c @@ -225,7 +225,7 @@ STATIC void pyb_timer_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ /// /// - `mode` can be one of: /// - `Timer.UP` - configures the timer to count from 0 to MOD (default) -/// - `Timer.CENTER` - confgures the timer to count from 0 to MOD and +/// - `Timer.CENTER` - configures the timer to count from 0 to MOD and /// then back down to 0. /// /// - `callback` - as per Timer.callback() diff --git a/py/formatfloat.c b/py/formatfloat.c index 050d3a9dfb..7cd471018d 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -230,7 +230,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch } } else { // Build positive exponent. - // We don't modify f at this point to avoid innaccuracies from + // We don't modify f at this point to avoid inaccuracies from // scaling it. Instead, we find the product of powers of 10 // that is not greater than it, and use that to start the // mantissa. diff --git a/py/mkrules.mk b/py/mkrules.mk index ec36346b8a..421e638c22 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -22,7 +22,7 @@ endif # QSTR generation uses the same CFLAGS, with these modifications. QSTR_GEN_FLAGS = -DNO_QSTR -# Note: := to force evalulation immediately. +# Note: := to force evaluation immediately. QSTR_GEN_CFLAGS := $(CFLAGS) QSTR_GEN_CFLAGS += $(QSTR_GEN_FLAGS) QSTR_GEN_CXXFLAGS := $(CXXFLAGS) diff --git a/py/mpconfig.h b/py/mpconfig.h index 433d6e50de..9a7eb1b15d 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1136,7 +1136,7 @@ typedef double mp_float_t; #define MICROPY_PY_BUILTINS_RANGE_BINOP (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING) #endif -// Support for callling next() with second argument +// Support for calling next() with second argument #ifndef MICROPY_PY_BUILTINS_NEXT2 #define MICROPY_PY_BUILTINS_NEXT2 (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING) #endif @@ -1155,13 +1155,13 @@ typedef double mp_float_t; #define MICROPY_PY_ALL_SPECIAL_METHODS (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES) #endif -// Whether to support all inplace arithmetic operarion methods +// Whether to support all inplace arithmetic operation methods // (__imul__, etc.) #ifndef MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS #define MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING) #endif -// Whether to support reverse arithmetic operarion methods +// Whether to support reverse arithmetic operation methods // (__radd__, etc.). Additionally gated by // MICROPY_PY_ALL_SPECIAL_METHODS. #ifndef MICROPY_PY_REVERSE_SPECIAL_METHODS diff --git a/py/obj.c b/py/obj.c index 64c52eeb76..d013eb3d02 100644 --- a/py/obj.c +++ b/py/obj.c @@ -286,7 +286,7 @@ mp_obj_t mp_obj_equal_not_equal(mp_binary_op_t op, mp_obj_t o1, mp_obj_t o2) { o2 = temp; } - // equality not implemented, so fall back to pointer conparison + // equality not implemented, so fall back to pointer comparison return (o1 == o2) ? local_true : local_false; } diff --git a/pyproject.toml b/pyproject.toml index e3d70385c3..96e2e3a890 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ line-length = 99 [tool.codespell] count = "" ignore-regex = '\b[A-Z]{3}\b' -ignore-words-list = "ans,asend,deques,dout,extint,hsi,iput,mis,numer,technic,ure" +ignore-words-list = "ans,asend,deques,dout,extint,hsi,iput,mis,numer,shft,technic,ure" quiet-level = 3 skip = """ */build*,\ diff --git a/tools/pydfu.py b/tools/pydfu.py index a9da3a0f83..e1e4074a6b 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -8,7 +8,7 @@ DFU, without requiring dfu-util. See app note AN3156 for a description of the DFU protocol. -See document UM0391 for a dscription of the DFuse file. +See document UM0391 for a description of the DFuse file. """ from __future__ import print_function