Skip to content

Commit 2490303

Browse files
committed
Add pre-commit changes (black 24.11) formattings changes
1 parent bd8ae23 commit 2490303

File tree

71 files changed

+115
-26
lines changed

Some content is hidden

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

71 files changed

+115
-26
lines changed

ports/espressif/bindings/espnow/ESPNow.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ STATIC const mp_stream_p_t espnow_stream_p = {
342342
//| This is an easy way to check if the buffer is empty.
343343
//| """
344344
//| ...
345+
//|
345346
//| def __len__(self) -> int:
346347
//| """Return the number of `bytes` available to read. Used to implement ``len()``."""
347348
//| ...

shared-bindings/_bleio/CharacteristicBuffer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ STATIC void check_for_deinit(bleio_characteristic_buffer_obj_t *self) {
9999
//| :return: Data read
100100
//| :rtype: bytes or None"""
101101
//| ...
102+
//|
102103
//| def readinto(self, buf: WriteableBuffer) -> Optional[int]:
103104
//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
104105
//|
105106
//| :return: number of bytes read and stored into ``buf``
106107
//| :rtype: int or None (on a non-blocking error)"""
107108
//| ...
109+
//|
108110
//| def readline(self) -> bytes:
109111
//| """Read a line, ending in a newline character.
110112
//|

shared-bindings/_bleio/Connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ void bleio_connection_ensure_connected(bleio_connection_obj_t *self) {
7272
//| Connections may also be made when another device initiates a connection. To use a Connection
7373
//| created by a peer, read the `Adapter.connections` property."""
7474
//| ...
75+
//|
7576
//| def disconnect(self) -> None:
7677
//| """Disconnects from the remote peripheral. Does nothing if already disconnected."""
7778
//| ...

shared-bindings/_bleio/Descriptor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
//| and attached to a Characteristic by calling `add_to_characteristic()`.
4545
//| Remote Descriptor objects are created by `Connection.discover_remote_services()`
4646
//| as part of remote Characteristics in the remote Services that are discovered."""
47+
//|
4748
//| @classmethod
4849
//| def add_to_characteristic(
4950
//| cls,

shared-bindings/_bleio/ScanEntry.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
//| def __init__(self) -> None:
4545
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
4646
//| ...
47+
//|
4748
//| def matches(self, prefixes: ScanEntry, *, match_all: bool = True) -> bool:
4849
//| """Returns True if the ScanEntry matches all prefixes when ``match_all`` is True. This is stricter
4950
//| than the scan filtering which accepts any advertisements that match any of the prefixes

shared-bindings/_bleio/ScanResults.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ STATIC mp_obj_t scanresults_iternext(mp_obj_t self_in) {
4949
//| def __init__(self) -> None:
5050
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
5151
//| ...
52+
//|
5253
//| def __iter__(self) -> Iterator[ScanEntry]:
5354
//| """Returns itself since it is the iterator."""
5455
//| ...
56+
//|
5557
//| def __next__(self) -> ScanEntry:
5658
//| """Returns the next `_bleio.ScanEntry`. Blocks if none have been received and scanning is still
5759
//| active. Raises `StopIteration` if scanning is finished and no other results are available.

shared-bindings/_pixelmap/PixelMap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ MP_DEFINE_CONST_FUN_OBJ_2(pixelmap_pixelmap_indices_obj, pixelmap_pixelmap_indic
161161
//| def __getitem__(self, index: slice) -> PixelReturnSequence:
162162
//| """Retrieve the value of the underlying pixels."""
163163
//| ...
164+
//|
164165
//| @overload
165166
//| def __getitem__(self, index: int) -> PixelReturnType:
166167
//| """Retrieve the value of one of the underlying pixels at 'index'."""
167168
//| ...
169+
//|
168170
//| @overload
169171
//| def __setitem__(self, index: slice, value: PixelSequence) -> None: ...
170172
//| @overload

shared-bindings/adafruit_pixelbuf/PixelBuf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,14 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_fill_obj, pixelbuf_pixelbuf_f
269269
//| between 0 and 255. When in PWM (DotStar) mode, the 4th tuple value is a float of the pixel
270270
//| intensity from 0-1.0."""
271271
//| ...
272+
//|
272273
//| @overload
273274
//| def __getitem__(self, index: int) -> PixelReturnType:
274275
//| """Returns the pixel value at the given index as a tuple of (Red, Green, Blue[, White]) values
275276
//| between 0 and 255. When in PWM (DotStar) mode, the 4th tuple value is a float of the pixel
276277
//| intensity from 0-1.0."""
277278
//| ...
279+
//|
278280
//| @overload
279281
//| def __setitem__(self, index: slice, value: PixelSequence) -> None: ...
280282
//| @overload

shared-bindings/alarm/SleepMemory.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@
5555
//| def __init__(self) -> None:
5656
//| """Not used. Access the sole instance through `alarm.sleep_memory`."""
5757
//| ...
58+
//|
5859
//| def __bool__(self) -> bool:
5960
//| """``sleep_memory`` is ``True`` if its length is greater than zero.
6061
//| This is an easy way to check for its existence.
6162
//| """
6263
//| ...
64+
//|
6365
//| def __len__(self) -> int:
6466
//| """Return the length. This is used by (`len`)"""
6567
//| ...
@@ -87,6 +89,7 @@ STATIC MP_DEFINE_CONST_DICT(alarm_sleep_memory_locals_dict, alarm_sleep_memory_l
8789
//| def __getitem__(self, index: int) -> int:
8890
//| """Returns the value at the given index."""
8991
//| ...
92+
//|
9093
//| @overload
9194
//| def __setitem__(self, index: slice, value: ReadableBuffer) -> None: ...
9295
//| @overload

shared-bindings/canio/Listener.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_in_waiting_obj, canio_listener_i
8080
//| This method exists so that `Listener` can be used as an
8181
//| iterable"""
8282
//| ...
83+
//|
8384
//| def __next__(self) -> Union[RemoteTransmissionRequest, Message]:
8485
//| """Reads a message, after waiting up to self.timeout seconds
8586
//|

0 commit comments

Comments
 (0)