Skip to content

Commit d582407

Browse files
committed
pre-commit fixes
1 parent 2171e67 commit d582407

141 files changed

Lines changed: 806 additions & 811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespell/ignore-words.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ deques
2020
extint
2121
shs
2222
pass-thru
23+
numer
24+
arithmetics
25+
ftbfs
26+
straightaway

extmod/extmod.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,3 @@ CFLAGS_MOD += -DMICROPY_PY_BTREE=1
228228
$(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter $(BTREE_DEFS)
229229
$(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS)
230230
endif
231-

extmod/moduasyncio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ STATIC void task_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
266266
dest[1] = self_in;
267267
} else if (attr == MP_QSTR_ph_key) {
268268
dest[0] = self->ph_key;
269-
// CIRCUITPY provides __await__().
269+
// CIRCUITPY provides __await__().
270270
} else if (attr == MP_QSTR___await__) {
271271
dest[0] = MP_OBJ_FROM_PTR(&task_await_obj);
272272
dest[1] = self_in;

extmod/moduplatform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "py/misc.h" // For MP_STRINGIFY.
3030
#include "py/mpconfig.h"
3131

32-
// Preprocessor directives indentifying the platform.
32+
// Preprocessor directives identifying the platform.
3333
// The (u)platform module itself is guarded by MICROPY_PY_UPLATFORM, see the
3434
// .c file, but these are made available because they're generally usable.
3535
// TODO: Add more architectures, compilers and libraries.

extmod/modure.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
#include "lib/re1.5/re1.5.h"
4141

42-
//CIRCUITPY
42+
// CIRCUITPY
4343
#if MICROPY_PY_URE_DEBUG
4444
#define FLAG_DEBUG 0x1000
4545
#endif

locale/circuitpython.pot

Lines changed: 64 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ msgstr ""
139139
msgid "%q index out of range"
140140
msgstr ""
141141

142+
#: py/obj.c
143+
msgid "%q indices must be integers, not %s"
144+
msgstr ""
145+
142146
#: shared-module/bitbangio/SPI.c
143147
msgid "%q init failed"
144148
msgstr ""
@@ -214,7 +218,7 @@ msgstr ""
214218
msgid "%q must be of type %q or %q, not %q"
215219
msgstr ""
216220

217-
#: py/argcheck.c py/obj.c py/objstrunicode.c shared-module/synthio/__init__.c
221+
#: py/argcheck.c py/objstrunicode.c shared-module/synthio/__init__.c
218222
msgid "%q must be of type %q, not %q"
219223
msgstr ""
220224

@@ -417,6 +421,10 @@ msgstr ""
417421
msgid "'yield' outside function"
418422
msgstr ""
419423

424+
#: py/compile.c
425+
msgid "* arg after **"
426+
msgstr ""
427+
420428
#: py/compile.c
421429
msgid "*x must be assignment target"
422430
msgstr ""
@@ -840,10 +848,6 @@ msgstr ""
840848
msgid "Coordinate arrays types have different sizes"
841849
msgstr ""
842850

843-
#: py/persistentcode.c
844-
msgid "Corrupt .mpy file"
845-
msgstr ""
846-
847851
#: ports/espressif/common-hal/neopixel_write/__init__.c
848852
msgid "Could not retrieve clock"
849853
msgstr ""
@@ -1138,12 +1142,6 @@ msgstr ""
11381142
msgid "In-buffer elements must be <= 4 bytes long"
11391143
msgstr ""
11401144

1141-
#: py/persistentcode.c
1142-
msgid ""
1143-
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
1144-
"mpy-update for more info."
1145-
msgstr ""
1146-
11471145
#: shared-bindings/_pew/PewPew.c
11481146
msgid "Incorrect buffer size"
11491147
msgstr ""
@@ -1490,7 +1488,7 @@ msgstr ""
14901488
msgid "No in or out in program"
14911489
msgstr ""
14921490

1493-
#: shared-bindings/time/__init__.c
1491+
#: py/objint.c shared-bindings/time/__init__.c
14941492
msgid "No long integer support"
14951493
msgstr ""
14961494

@@ -2498,6 +2496,10 @@ msgstr ""
24982496
msgid "array/bytes required on right side"
24992497
msgstr ""
25002498

2499+
#: py/asmxtensa.c
2500+
msgid "asm overflow"
2501+
msgstr ""
2502+
25012503
#: extmod/ulab/code/numpy/numerical.c
25022504
msgid "attempt to get (arg)min/(arg)max of empty sequence"
25032505
msgstr ""
@@ -2587,6 +2589,10 @@ msgstr ""
25872589
msgid "buffer too small for requested bytes"
25882590
msgstr ""
25892591

2592+
#: py/emitbc.c
2593+
msgid "bytecode overflow"
2594+
msgstr ""
2595+
25902596
#: py/objarray.c
25912597
msgid "bytes length not a multiple of item size"
25922598
msgstr ""
@@ -2632,7 +2638,7 @@ msgstr ""
26322638
msgid "can't cancel self"
26332639
msgstr ""
26342640

2635-
#: py/obj.c py/objint.c py/runtime.c shared-module/adafruit_pixelbuf/PixelBuf.c
2641+
#: py/objint.c py/runtime.c shared-module/adafruit_pixelbuf/PixelBuf.c
26362642
msgid "can't convert %q to %q"
26372643
msgstr ""
26382644

@@ -2641,6 +2647,11 @@ msgstr ""
26412647
msgid "can't convert %s to complex"
26422648
msgstr ""
26432649

2650+
#: py/obj.c
2651+
#, c-format
2652+
msgid "can't convert %s to float"
2653+
msgstr ""
2654+
26442655
#: py/objstr.c
26452656
msgid "can't convert '%q' object to %q implicitly"
26462657
msgstr ""
@@ -2650,11 +2661,11 @@ msgid "can't convert complex to float"
26502661
msgstr ""
26512662

26522663
#: py/obj.c
2653-
msgid "can't convert to %q"
2664+
msgid "can't convert to complex"
26542665
msgstr ""
26552666

26562667
#: py/obj.c
2657-
msgid "can't convert to complex"
2668+
msgid "can't convert to float"
26582669
msgstr ""
26592670

26602671
#: py/runtime.c
@@ -2681,14 +2692,6 @@ msgstr ""
26812692
msgid "can't do truncated division of a complex number"
26822693
msgstr ""
26832694

2684-
#: py/compile.c
2685-
msgid "can't have multiple **x"
2686-
msgstr ""
2687-
2688-
#: py/compile.c
2689-
msgid "can't have multiple *x"
2690-
msgstr ""
2691-
26922695
#: py/emitnative.c
26932696
msgid "can't implicitly convert '%q' to 'bool'"
26942697
msgstr ""
@@ -2743,6 +2746,10 @@ msgid ""
27432746
"can't switch from manual field specification to automatic field numbering"
27442747
msgstr ""
27452748

2749+
#: extmod/moduasyncio.c
2750+
msgid "can't wait"
2751+
msgstr ""
2752+
27462753
#: extmod/ulab/code/ndarray.c
27472754
msgid "cannot assign new shape"
27482755
msgstr ""
@@ -2839,10 +2846,6 @@ msgstr ""
28392846
msgid "compression header"
28402847
msgstr ""
28412848

2842-
#: py/parse.c
2843-
msgid "constant must be an integer"
2844-
msgstr ""
2845-
28462849
#: py/emitnative.c
28472850
msgid "conversion to object"
28482851
msgstr ""
@@ -3179,7 +3182,11 @@ msgid "import * not at module level"
31793182
msgstr ""
31803183

31813184
#: py/persistentcode.c
3182-
msgid "incompatible native .mpy architecture"
3185+
msgid "incompatible .mpy arch"
3186+
msgstr ""
3187+
3188+
#: py/persistentcode.c
3189+
msgid "incompatible .mpy file"
31833190
msgstr ""
31843191

31853192
#: py/objstr.c
@@ -3208,6 +3215,10 @@ msgstr ""
32083215
msgid "index out of range"
32093216
msgstr ""
32103217

3218+
#: py/obj.c
3219+
msgid "indices must be integers"
3220+
msgstr ""
3221+
32113222
#: extmod/ulab/code/ndarray.c
32123223
msgid "indices must be integers, slices, or Boolean lists"
32133224
msgstr ""
@@ -3341,10 +3352,6 @@ msgstr ""
33413352
msgid "invalid exception"
33423353
msgstr ""
33433354

3344-
#: extmod/modframebuf.c
3345-
msgid "invalid format"
3346-
msgstr ""
3347-
33483355
#: py/objstr.c
33493356
msgid "invalid format specifier"
33503357
msgstr ""
@@ -3406,10 +3413,6 @@ msgstr ""
34063413
msgid "keyword argument(s) not yet implemented - use normal args instead"
34073414
msgstr ""
34083415

3409-
#: py/bc.c
3410-
msgid "keywords must be strings"
3411-
msgstr ""
3412-
34133416
#: py/emitinlinethumb.c py/emitinlinextensa.c
34143417
msgid "label '%q' not defined"
34153418
msgstr ""
@@ -3634,14 +3637,6 @@ msgstr ""
36343637
msgid "non-hex digit found"
36353638
msgstr ""
36363639

3637-
#: py/compile.c
3638-
msgid "non-keyword arg after */**"
3639-
msgstr ""
3640-
3641-
#: py/compile.c
3642-
msgid "non-keyword arg after keyword arg"
3643-
msgstr ""
3644-
36453640
#: ports/nrf/common-hal/_bleio/Adapter.c
36463641
msgid "non-zero timeout must be > 0.01"
36473642
msgstr ""
@@ -3654,6 +3649,10 @@ msgstr ""
36543649
msgid "not a 128-bit UUID"
36553650
msgstr ""
36563651

3652+
#: py/parse.c
3653+
msgid "not a constant"
3654+
msgstr ""
3655+
36573656
#: py/objstr.c
36583657
msgid "not all arguments converted during string formatting"
36593658
msgstr ""
@@ -3892,6 +3891,14 @@ msgstr ""
38923891
msgid "port must be >= 0"
38933892
msgstr ""
38943893

3894+
#: py/compile.c
3895+
msgid "positional arg after **"
3896+
msgstr ""
3897+
3898+
#: py/compile.c
3899+
msgid "positional arg after keyword arg"
3900+
msgstr ""
3901+
38953902
#: py/objint_mpz.c
38963903
msgid "pow() 3rd argument cannot be 0"
38973904
msgstr ""
@@ -3920,6 +3927,11 @@ msgstr ""
39203927
msgid "relative import"
39213928
msgstr ""
39223929

3930+
#: py/obj.c
3931+
#, c-format
3932+
msgid "requested length %d but object has length %d"
3933+
msgstr ""
3934+
39233935
#: extmod/ulab/code/ndarray_operators.c
39243936
msgid "results cannot be cast to specified type"
39253937
msgstr ""
@@ -4114,6 +4126,10 @@ msgstr ""
41144126
msgid "tobytes can be invoked for dense arrays only"
41154127
msgstr ""
41164128

4129+
#: py/compile.c
4130+
msgid "too many args"
4131+
msgstr ""
4132+
41174133
#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c
41184134
msgid "too many dimensions"
41194135
msgstr ""
@@ -4139,6 +4155,10 @@ msgstr ""
41394155
msgid "trapz is defined for 1D iterables"
41404156
msgstr ""
41414157

4158+
#: py/obj.c
4159+
msgid "tuple/list has wrong length"
4160+
msgstr ""
4161+
41424162
#: ports/espressif/common-hal/canio/CAN.c
41434163
#, c-format
41444164
msgid "twai_driver_install returned esp-idf error #%d"

main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
418418
};
419419
#if CIRCUITPY_FULL_BUILD
420420
static const char *const double_extension_filenames[] = {
421-
"code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
422-
"main.txt.py", "main.py.txt", "main.txt.txt","main.py.py"
421+
"code.txt.py", "code.py.txt", "code.txt.txt", "code.py.py",
422+
"main.txt.py", "main.py.txt", "main.txt.txt", "main.py.py"
423423
};
424424
#endif
425425

@@ -992,9 +992,9 @@ int __attribute__((used)) main(void) {
992992

993993
#if CIRCUITPY_BOOT_COUNTER
994994
// Increment counter before possibly entering safe mode
995-
common_hal_nvm_bytearray_get_bytes(&common_hal_mcu_nvm_obj,0,1,&value_out);
995+
common_hal_nvm_bytearray_get_bytes(&common_hal_mcu_nvm_obj, 0, 1, &value_out);
996996
++value_out;
997-
common_hal_nvm_bytearray_set_bytes(&common_hal_mcu_nvm_obj,0,&value_out,1);
997+
common_hal_nvm_bytearray_set_bytes(&common_hal_mcu_nvm_obj, 0, &value_out, 1);
998998
#endif
999999

10001000
// Start the debug serial

mpy-cross/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#endif
3939
#endif
4040

41-
//CIRCUITPY: native emitters not supported
41+
// CIRCUITPY: native emitters not supported
4242
#define MICROPY_EMIT_X64 (!CIRCUITPY)
4343
#define MICROPY_EMIT_X86 (!CIRCUITPY)
4444
#define MICROPY_EMIT_THUMB (!CIRCUITPY)

ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
2222
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA15) },
2323

2424
{ MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA14) },
25-
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED),MP_ROM_PTR(&pin_PA14) },
26-
{ MP_OBJ_NEW_QSTR(MP_QSTR_STATUS_LED),MP_ROM_PTR(&pin_PA14) },
25+
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA14) },
26+
{ MP_OBJ_NEW_QSTR(MP_QSTR_STATUS_LED), MP_ROM_PTR(&pin_PA14) },
2727

28-
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PA04) },
29-
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PA05) },
28+
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA04) },
29+
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA05) },
3030

31-
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK),MP_ROM_PTR(&pin_PA11) },
32-
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA10) },
33-
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_PA09) },
31+
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA11) },
32+
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA10) },
33+
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA09) },
3434

3535
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
3636
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

0 commit comments

Comments
 (0)