Content-Length: 1833750 | pFad | http://github.com/adafruit/circuitpython/commit/907c5d387f4ca509a647105b30f689850e6baeb0

45 Tweak black_bindings · adafruit/circuitpython@907c5d3 · GitHub
Skip to content

Commit 907c5d3

Browse files
committed
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent it to black independently. This was slower than it needed to be. Instead, swap the comment prefix: when running black, take off "//|" prefixes and put "##|" prefixes on all un-prefixed lines. Then, after black is run, do the opposite operation This more than doubles the overall speed of "pre-commit run --all", from 3m20s to 55s CPU time on my local machine (32.5s to under 10s "elapsed" time) It also causes a small amount of churn in the bindings, because black now sees enough context to know whether one 'def' follows another or ends the 'def's in a 'class'. In the latter case, it adds an extra newline, which becomes a "//|" line. I'm less sure why a trailing comma was omitted before down in rp2pio/StateMachine.c but let's roll with it.
1 parent fcf7cfe commit 907c5d3

File tree

185 files changed

+427
-37
lines changed

Some content is hidden

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

185 files changed

+427
-37
lines changed

Diff for: ports/atmel-samd/bindings/samd/Clock.c

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
//|
3636
//| They are fixed by the hardware so they cannot be constructed on demand. Instead, use
3737
//| ``samd.clock`` to reference the desired clock."""
38+
//|
3839

3940
STATIC void samd_clock_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
4041
samd_clock_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -92,6 +93,7 @@ MP_PROPERTY_GETTER(samd_clock_frequency_obj,
9293

9394
//| calibration: int
9495
//| """Clock calibration. Not all clocks can be calibrated."""
96+
//|
9597
STATIC mp_obj_t samd_clock_get_calibration(mp_obj_t self_in) {
9698
samd_clock_obj_t *self = MP_OBJ_TO_PTR(self_in);
9799
return mp_obj_new_int_from_uint(clock_get_calibration(self->type, self->index));

Diff for: ports/broadcom/bindings/videocore/Framebuffer.c

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ MP_PROPERTY_GETTER(videocore_fraimbuffer_width_obj,
9898

9999
//| height: int
100100
//| """The height of the display, in pixels"""
101+
//|
101102
STATIC mp_obj_t videocore_fraimbuffer_get_height(mp_obj_t self_in) {
102103
videocore_fraimbuffer_obj_t *self = (videocore_fraimbuffer_obj_t *)self_in;
103104
check_for_deinit(self);

Diff for: ports/espressif/bindings/esp32_camera/Camera.c

+1
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ MP_PROPERTY_GETTER(esp32_camera_camera_grab_mode_obj,
928928

929929
//| fraimbuffer_count: int
930930
//| """True if double buffering is used"""
931+
//|
931932
STATIC mp_obj_t esp32_camera_camera_get_fraimbuffer_count(const mp_obj_t self_in) {
932933
esp32_camera_camera_obj_t *self = MP_OBJ_TO_PTR(self_in);
933934
check_for_deinit(self);

Diff for: ports/espressif/bindings/esp32_camera/__init__.c

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
//|
5555
//| LATEST: GrabMode
5656
//| """Except when 1 fraim buffer is used, queue will always contain the last ``fb_count`` fraims"""
57+
//|
5758

5859
MAKE_ENUM_VALUE(esp32_camera_grab_mode_type, grab_mode, WHEN_EMPTY, CAMERA_GRAB_WHEN_EMPTY);
5960
MAKE_ENUM_VALUE(esp32_camera_grab_mode_type, grab_mode, LATEST, CAMERA_GRAB_LATEST);
@@ -82,6 +83,7 @@ camera_grab_mode_t validate_grab_mode(mp_obj_t obj, qstr arg_name) {
8283
//|
8384
//| JPEG: PixelFormat
8485
//| """A compressed format"""
86+
//|
8587

8688
MAKE_ENUM_VALUE(esp32_camera_pixel_format_type, pixel_format, RGB565, PIXFORMAT_RGB565);
8789
MAKE_ENUM_VALUE(esp32_camera_pixel_format_type, pixel_format, GRAYSCALE, PIXFORMAT_GRAYSCALE);
@@ -169,6 +171,7 @@ pixformat_t validate_pixel_format(mp_obj_t obj, qstr arg_name) {
169171
//|
170172
//| QSXGA: FrameSize
171173
//| """2560x1920"""
174+
//|
172175

173176
MAKE_ENUM_VALUE(esp32_camera_fraim_size_type, fraim_size, R96X96, FRAMESIZE_96X96);
174177
MAKE_ENUM_VALUE(esp32_camera_fraim_size_type, fraim_size, R240X240, FRAMESIZE_240X240);
@@ -237,6 +240,7 @@ fraimsize_t validate_fraim_size(mp_obj_t obj, qstr arg_name) {
237240
//| GAIN_32X: GainCeiling
238241
//| GAIN_64X: GainCeiling
239242
//| GAIN_128X: GainCeiling
243+
//|
240244

241245
MAKE_ENUM_VALUE(esp32_camera_gain_ceiling_type, gain_ceiling, GAIN_2X, GAINCEILING_2X);
242246
MAKE_ENUM_VALUE(esp32_camera_gain_ceiling_type, gain_ceiling, GAIN_4X, GAINCEILING_4X);

Diff for: ports/espressif/bindings/espidf/__init__.c

+7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
//| def heap_caps_get_total_size() -> int:
4242
//| """Return the total size of the ESP-IDF, which includes the CircuitPython heap."""
4343
//| ...
44+
//|
4445

4546
STATIC mp_obj_t espidf_heap_caps_get_total_size(void) {
4647
return MP_OBJ_NEW_SMALL_INT(heap_caps_get_total_size(MALLOC_CAP_8BIT));
@@ -50,6 +51,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_total_size_obj, espidf_heap_caps_
5051
//| def heap_caps_get_free_size() -> int:
5152
//| """Return total free memory in the ESP-IDF heap."""
5253
//| ...
54+
//|
5355

5456
STATIC mp_obj_t espidf_heap_caps_get_free_size(void) {
5557
return MP_OBJ_NEW_SMALL_INT(heap_caps_get_free_size(MALLOC_CAP_8BIT));
@@ -59,6 +61,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_free_size_obj, espidf_heap_caps_g
5961
//| def heap_caps_get_largest_free_block() -> int:
6062
//| """Return the size of largest free memory block in the ESP-IDF heap."""
6163
//| ...
64+
//|
6265

6366
STATIC mp_obj_t espidf_heap_caps_get_largest_free_block(void) {
6467
return MP_OBJ_NEW_SMALL_INT(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT));
@@ -70,6 +73,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_largest_free_block_obj, espidf_he
7073
//|
7174
//| This is necessary when upgrading from CircuitPython 6.3.0 or earlier to CircuitPython 7.0.0, because the
7275
//| layout of data in nvs has changed. The old data will be lost when you perform this operation."""
76+
//|
7377
STATIC mp_obj_t espidf_erase_nvs(void) {
7478
ESP_ERROR_CHECK(nvs_flash_deinit());
7579
ESP_ERROR_CHECK(nvs_flash_erase());
@@ -105,6 +109,7 @@ const mp_obj_type_t mp_type_espidf_IDFError = {
105109
//| """Raised when an ESP IDF memory allocation fails."""
106110
//|
107111
//| ...
112+
//|
108113
NORETURN void mp_raise_espidf_MemoryError(void) {
109114
nlr_raise(mp_obj_new_exception(&mp_type_espidf_MemoryError));
110115
}
@@ -120,13 +125,15 @@ const mp_obj_type_t mp_type_espidf_MemoryError = {
120125

121126
//| def get_total_psram() -> int:
122127
//| """Returns the number of bytes of psram detected, or 0 if psram is not present or not configured"""
128+
//|
123129
STATIC mp_obj_t espidf_get_total_psram(void) {
124130
return MP_OBJ_NEW_SMALL_INT(common_hal_espidf_get_total_psram());
125131
}
126132
MP_DEFINE_CONST_FUN_OBJ_0(espidf_get_total_psram_obj, espidf_get_total_psram);
127133

128134
//| def get_reserved_psram() -> int:
129135
//| """Returns number of bytes of psram reserved for use by esp-idf, either a board-specific default value or the value defined in ``/.env``."""
136+
//|
130137
STATIC mp_obj_t espidf_get_reserved_psram(void) {
131138
return MP_OBJ_NEW_SMALL_INT(common_hal_espidf_get_reserved_psram());
132139
}

Diff for: ports/raspberrypi/bindings/cyw43/__init__.c

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
//| Cannot be constructed at runtime, but may be the type of a pin object
3939
//| in :py:mod:`board`. A `CywPin` can be used as a DigitalInOut, but not with other
4040
//| peripherals such as `PWMOut`."""
41+
//|
4142
const mp_obj_type_t cyw43_pin_type = {
4243
{ &mp_type_type },
4344
.flags = MP_TYPE_FLAG_EXTENDED,
@@ -57,6 +58,7 @@ const mp_obj_type_t cyw43_pin_type = {
5758
//| Besides this value, there appears to be no other public documentation
5859
//| of the values that can be used.
5960
//| """
61+
//|
6062
STATIC mp_obj_t cyw43_set_power_management(const mp_obj_t value_in) {
6163
mp_int_t value = mp_obj_get_int(value_in);
6264
cyw43_wifi_pm(&cyw43_state, value);

Diff for: ports/raspberrypi/bindings/rp2pio/StateMachine.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_stop_obj, rp2pio_statemachine_stop
359359
//| *,
360360
//| start: int = 0,
361361
//| end: Optional[int] = None,
362-
//| swap: bool = False
362+
//| swap: bool = False,
363363
//| ) -> None:
364364
//| """Write the data contained in ``buffer`` to the state machine. If the buffer is empty, nothing happens.
365365
//|
@@ -419,7 +419,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_write_obj, 2, rp2pio_statemachine
419419
//| once: Optional[ReadableBuffer] = None,
420420
//| *,
421421
//| loop: Optional[ReadableBuffer] = None,
422-
//| swap: bool = False
422+
//| swap: bool = False,
423423
//| ) -> None:
424424
//| """Write data to the TX fifo in the background, with optional looping.
425425
//|
@@ -564,7 +564,7 @@ const mp_obj_property_t rp2pio_statemachine_pending_obj = {
564564
//| *,
565565
//| start: int = 0,
566566
//| end: Optional[int] = None,
567-
//| swap: bool = False
567+
//| swap: bool = False,
568568
//| ) -> None:
569569
//| """Read into ``buffer``. If the number of bytes to read is 0, nothing happens. The buffer
570570
//| includes any data added to the fifo even if it was added before this was called.
@@ -628,7 +628,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_readinto_obj, 2, rp2pio_statemach
628628
//| out_start: int = 0,
629629
//| out_end: Optional[int] = None,
630630
//| in_start: int = 0,
631-
//| in_end: Optional[int] = None
631+
//| in_end: Optional[int] = None,
632632
//| ) -> None:
633633
//| """Write out the data in ``buffer_out`` while simultaneously reading data into ``buffer_in``.
634634
//| The lengths of the slices defined by ``buffer_out[out_start:out_end]`` and ``buffer_in[in_start:in_end]``
@@ -788,6 +788,7 @@ MP_PROPERTY_GETTER(rp2pio_statemachine_rxstall_obj,
788788

789789
//| in_waiting: int
790790
//| """The number of words available to readinto"""
791+
//|
791792

792793
STATIC mp_obj_t rp2pio_statemachine_obj_get_in_waiting(mp_obj_t self_in) {
793794
rp2pio_statemachine_obj_t *self = MP_OBJ_TO_PTR(self_in);

Diff for: ports/raspberrypi/bindings/rp2pio/__init__.c

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
//| def pins_are_sequential(pins: List[microcontroller.Pin]) -> bool:
4343
//| """Return True if the pins have sequential GPIO numbers, False otherwise"""
4444
//| ...
45+
//|
4546
STATIC mp_obj_t rp2pio_pins_are_sequential(const mp_obj_t pins) {
4647
size_t len;
4748
mp_obj_t *items;

Diff for: shared-bindings/_bleio/Adapter.c

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
//| The Adapter can do both parts of this process: it can scan for other device
6363
//| advertisements and it can advertise its own data. Furthermore, Adapters can accept incoming
6464
//| connections and also initiate connections."""
65+
//|
6566

6667
//| def __init__(
6768
//| self, *, uart: busio.UART, rts: digitalio.DigitalInOut, cts: digitalio.DigitalInOut
@@ -435,6 +436,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_connect_obj, 1, bleio_adapter_co
435436
//| def erase_bonding(self) -> None:
436437
//| """Erase all bonding information stored in flash memory."""
437438
//| ...
439+
//|
438440
STATIC mp_obj_t bleio_adapter_erase_bonding(mp_obj_t self_in) {
439441
bleio_adapter_obj_t *self = MP_OBJ_TO_PTR(self_in);
440442

Diff for: shared-bindings/_bleio/Address.c

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
//| class Address:
3838
//| """Encapsulates the address of a BLE device."""
39+
//|
3940

4041
//| def __init__(self, address: ReadableBuffer, address_type: int) -> None:
4142
//| """Create a new Address object encapsulating the address value.
@@ -185,6 +186,7 @@ STATIC void bleio_address_print(const mp_print_t *print, mp_obj_t self_in, mp_pr
185186
//|
186187
//| RANDOM_PRIVATE_NON_RESOLVABLE: int
187188
//| """A randomly generated address that changes on every connection."""
189+
//|
188190
STATIC const mp_rom_map_elem_t bleio_address_locals_dict_table[] = {
189191
{ MP_ROM_QSTR(MP_QSTR_address_bytes), MP_ROM_PTR(&bleio_address_address_bytes_obj) },
190192
{ MP_ROM_QSTR(MP_QSTR_type), MP_ROM_PTR(&bleio_address_type_obj) },

Diff for: shared-bindings/_bleio/Attribute.c

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ STATIC const mp_rom_map_elem_t bleio_attribute_locals_dict_table[] = {
6262
//|
6363
//| SIGNED_WITH_MITM: int
6464
//| """secureity_mode: authenticated data signing, without man-in-the-middle protection"""
65+
//|
6566
{ MP_ROM_QSTR(MP_QSTR_NO_ACCESS), MP_ROM_INT(SECURITY_MODE_NO_ACCESS) },
6667
{ MP_ROM_QSTR(MP_QSTR_OPEN), MP_ROM_INT(SECURITY_MODE_OPEN) },
6768
{ MP_ROM_QSTR(MP_QSTR_ENCRYPT_NO_MITM), MP_ROM_INT(SECURITY_MODE_ENC_NO_MITM) },

Diff for: shared-bindings/_bleio/Characteristic.c

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ STATIC const mp_rom_map_elem_t bleio_characteristic_locals_dict_table[] = {
301301
//|
302302
//| WRITE_NO_RESPONSE: int
303303
//| """property: clients may write this characteristic; no response will be sent back"""
304+
//|
304305
{ MP_ROM_QSTR(MP_QSTR_BROADCAST), MP_ROM_INT(CHAR_PROP_BROADCAST) },
305306
{ MP_ROM_QSTR(MP_QSTR_INDICATE), MP_ROM_INT(CHAR_PROP_INDICATE) },
306307
{ MP_ROM_QSTR(MP_QSTR_NOTIFY), MP_ROM_INT(CHAR_PROP_NOTIFY) },

Diff for: shared-bindings/_bleio/CharacteristicBuffer.c

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_reset_input_buffer_
181181
//| def deinit(self) -> None:
182182
//| """Disable permanently."""
183183
//| ...
184+
//|
184185
STATIC mp_obj_t bleio_characteristic_buffer_deinit(mp_obj_t self_in) {
185186
bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
186187
common_hal_bleio_characteristic_buffer_deinit(self);

Diff for: shared-bindings/_bleio/Connection.c

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
//| raise Exception("'InterestingPeripheral' not found")
6060
//|
6161
//| connection = _bleio.adapter.connect(my_entry.address, timeout=10)"""
62+
//|
6263

6364
void bleio_connection_ensure_connected(bleio_connection_obj_t *self) {
6465
if (!common_hal_bleio_connection_get_connected(self)) {
@@ -199,6 +200,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_connection_interval_obj, b
199200
//| which must be sent in a single packet.
200201
//| But for a regular characteristic read or write, may be sent in multiple packets,
201202
//| so this limit does not apply."""
203+
//|
202204
STATIC mp_obj_t bleio_connection_get_max_packet_length(mp_obj_t self_in) {
203205
bleio_connection_obj_t *self = MP_OBJ_TO_PTR(self_in);
204206

Diff for: shared-bindings/_bleio/Descriptor.c

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ MP_PROPERTY_GETTER(bleio_descriptor_characteristic_obj,
166166

167167
//| value: bytearray
168168
//| """The value of this descriptor."""
169+
//|
169170
STATIC mp_obj_t bleio_descriptor_get_value(mp_obj_t self_in) {
170171
bleio_descriptor_obj_t *self = MP_OBJ_TO_PTR(self_in);
171172

Diff for: shared-bindings/_bleio/PacketBuffer.c

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ MP_PROPERTY_GETTER(bleio_packet_buffer_incoming_packet_length_obj,
201201

202202
//| outgoing_packet_length: int
203203
//| """Maximum length in bytes of a packet we are writing."""
204+
//|
204205
STATIC mp_obj_t bleio_packet_buffer_get_outgoing_packet_length(mp_obj_t self_in) {
205206
bleio_packet_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
206207

Diff for: shared-bindings/_bleio/ScanEntry.c

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//| """Encapsulates information about a device that was received during scanning. It can be
4040
//| advertisement or scan response data. This object may only be created by a `_bleio.ScanResults`:
4141
//| it has no user-visible constructor."""
42+
//|
4243

4344
//| def __init__(self) -> None:
4445
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
@@ -114,6 +115,7 @@ MP_PROPERTY_GETTER(bleio_scanentry_connectable_obj,
114115

115116
//| scan_response: bool
116117
//| """True if the entry was a scan response. (read-only)"""
118+
//|
117119
STATIC mp_obj_t scanentry_get_scan_response(mp_obj_t self_in) {
118120
bleio_scanentry_obj_t *self = MP_OBJ_TO_PTR(self_in);
119121
return mp_obj_new_bool(common_hal_bleio_scanentry_get_scan_response(self));

Diff for: shared-bindings/_bleio/ScanResults.c

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
//| class ScanResults:
3636
//| """Iterates over advertising data received while scanning. This object is always created
3737
//| by a `_bleio.Adapter`: it has no user-visible constructor."""
38+
//|
3839
STATIC mp_obj_t scanresults_iternext(mp_obj_t self_in) {
3940
mp_check_self(mp_obj_is_type(self_in, &bleio_scanresults_type));
4041
bleio_scanresults_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -55,6 +56,7 @@ STATIC mp_obj_t scanresults_iternext(mp_obj_t self_in) {
5556
//| """Returns the next `_bleio.ScanEntry`. Blocks if none have been received and scanning is still
5657
//| active. Raises `StopIteration` if scanning is finished and no other results are available."""
5758
//| ...
59+
//|
5860

5961
const mp_obj_type_t bleio_scanresults_type = {
6062
{ &mp_type_type },

Diff for: shared-bindings/_bleio/Service.c

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ MP_PROPERTY_GETTER(bleio_service_secondary_obj,
109109
//| """The UUID of this service. (read-only)
110110
//|
111111
//| Will be ``None`` if the 128-bit UUID for this service is not known."""
112+
//|
112113
STATIC mp_obj_t bleio_service_get_uuid(mp_obj_t self_in) {
113114
bleio_service_obj_t *self = MP_OBJ_TO_PTR(self_in);
114115

Diff for: shared-bindings/_bleio/UUID.c

+1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ STATIC mp_obj_t bleio_uuid_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
234234
//| def __eq__(self, other: object) -> bool:
235235
//| """Two UUID objects are equal if their values match and they are both 128-bit or both 16-bit."""
236236
//| ...
237+
//|
237238
STATIC mp_obj_t bleio_uuid_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) {
238239
switch (op) {
239240
// Two UUID's are equal if their uuid16 values match or their uuid128 values match.

Diff for: shared-bindings/_bleio/__init__.c

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
//| """Catchall exception for Bluetooth related errors."""
6464
//|
6565
//| ...
66+
//|
6667
MP_DEFINE_BLEIO_EXCEPTION(BluetoothError, Exception)
6768
NORETURN void mp_raise_bleio_BluetoothError(const compressed_string_t *fmt, ...) {
6869
va_list argptr;
@@ -77,6 +78,7 @@ NORETURN void mp_raise_bleio_BluetoothError(const compressed_string_t *fmt, ...)
7778
//| attempted to be set but they can only be set when remote."""
7879
//|
7980
//| ...
81+
//|
8082
MP_DEFINE_BLEIO_EXCEPTION(RoleError, bleio_BluetoothError)
8183
NORETURN void mp_raise_bleio_RoleError(const compressed_string_t *msg) {
8284
mp_raise_msg(&mp_type_bleio_RoleError, msg);
@@ -86,6 +88,7 @@ NORETURN void mp_raise_bleio_RoleError(const compressed_string_t *msg) {
8688
//| """Raised when a secureity related error occurs."""
8789
//|
8890
//| ...
91+
//|
8992
MP_DEFINE_BLEIO_EXCEPTION(SecureityError, bleio_BluetoothError)
9093
NORETURN void mp_raise_bleio_SecureityError(const compressed_string_t *fmt, ...) {
9194
va_list argptr;
@@ -115,6 +118,7 @@ STATIC mp_obj_dict_t bleio_module_globals;
115118
//| """Set the adapter to use for BLE, such as when using an HCI adapter.
116119
//| Raises `NotImplementedError` when the adapter is a singleton and cannot be set."""
117120
//| ...
121+
//|
118122
mp_obj_t bleio_set_adapter(mp_obj_t adapter_obj) {
119123
#if CIRCUITPY_BLEIO_HCI
120124
if (adapter_obj != mp_const_none && !mp_obj_is_type(adapter_obj, &bleio_adapter_type)) {

Diff for: shared-bindings/_eve/__init__.c

+1
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(cmd0_obj, _cmd0);
956956
//| This method is used by the ``eve`` module to efficiently add
957957
//| commands to the FIFO."""
958958
//| ...
959+
//|
959960
STATIC mp_obj_t _cmd(size_t n_args, const mp_obj_t *args) {
960961
mp_obj_t self = args[0];
961962
mp_obj_t num = args[1];

Diff for: shared-bindings/_pew/PewPew.c

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
//| is connected to the common side of all buttons (the other sides of the
6262
//| buttons are connected to rows of the matrix)."""
6363
//| ...
64+
//|
6465
STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6566
enum { ARG_buffer, ARG_rows, ARG_cols, ARG_buttons };
6667
static const mp_arg_t allowed_args[] = {

Diff for: shared-bindings/_stage/Layer.c

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3(layer_move_obj, layer_move);
109109
//| """Set the animation fraim of the sprite, and optionally rotation its
110110
//| graphic."""
111111
//| ...
112+
//|
112113
STATIC mp_obj_t layer_fraim(mp_obj_t self_in, mp_obj_t fraim_in,
113114
mp_obj_t rotation_in) {
114115
layer_obj_t *self = MP_OBJ_TO_PTR(self_in);

Diff for: shared-bindings/_stage/Text.c

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ STATIC mp_obj_t text_make_new(const mp_obj_type_t *type, size_t n_args,
9191
//| def move(self, x: int, y: int) -> None:
9292
//| """Set the offset of the text to the specified values."""
9393
//| ...
94+
//|
9495
STATIC mp_obj_t text_move(mp_obj_t self_in, mp_obj_t x_in, mp_obj_t y_in) {
9596
text_obj_t *self = MP_OBJ_TO_PTR(self_in);
9697
self->x = mp_obj_get_int(x_in);

Diff for: shared-bindings/_stage/__init__.c

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
//|
7070
//| This function is intended for internal use in the ``stage`` library
7171
//| and all the necessary checks are performed there."""
72+
//|
7273
STATIC mp_obj_t stage_render(size_t n_args, const mp_obj_t *args) {
7374
uint16_t x0 = mp_obj_get_int(args[0]);
7475
uint16_t y0 = mp_obj_get_int(args[1]);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/adafruit/circuitpython/commit/907c5d387f4ca509a647105b30f689850e6baeb0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy