apply pre-commit formatting and translations · csamuelson/circuitpython@dd7acd5 · GitHub
Skip to content

Commit dd7acd5

Browse files
apply pre-commit formatting and translations
1 parent 1942d05 commit dd7acd5

29 files changed

Lines changed: 44 additions & 78 deletions

File tree

locale/circuitpython.pot

Lines changed: 12 additions & 4 deletions

ports/atmel-samd/common-hal/spitarget/SPITarget.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void common_hal_spitarget_spi_target_deinit(spitarget_spi_target_obj_t *self) {
181181

182182
void common_hal_spitarget_spi_target_transfer_start(spitarget_spi_target_obj_t *self,
183183
uint8_t *mosi_packet, const uint8_t *miso_packet, size_t len) {
184-
if (len == 0) {
184+
if (len == 0) {
185185
return;
186186
}
187187
if (self->running_dma.failure != 1) {
@@ -191,7 +191,7 @@ void common_hal_spitarget_spi_target_transfer_start(spitarget_spi_target_obj_t *
191191
self->mosi_packet = mosi_packet;
192192
self->miso_packet = miso_packet;
193193

194-
Sercom* sercom = self->spi_desc.dev.prvt;
194+
Sercom *sercom = self->spi_desc.dev.prvt;
195195
self->running_dma = shared_dma_transfer_start(sercom, miso_packet, &sercom->SPI.DATA.reg, &sercom->SPI.DATA.reg, mosi_packet, len, 0);
196196

197197
// There is an issue where if an unexpected SPI transfer is received before the user calls "end" for the in-progress, expected
@@ -209,14 +209,14 @@ void common_hal_spitarget_spi_target_transfer_start(spitarget_spi_target_obj_t *
209209
// save configurations
210210
hri_sercomspi_ctrla_reg_t ctrla_saved_val = hri_sercomspi_get_CTRLA_reg(sercom, -1); // -1 mask is all ones: save all bits
211211
hri_sercomspi_ctrlb_reg_t ctrlb_saved_val = hri_sercomspi_get_CTRLB_reg(sercom, -1); // -1 mask is all ones: save all bits
212-
hri_sercomspi_baud_reg_t baud_saved_val = hri_sercomspi_get_BAUD_reg(sercom, -1); // -1 mask is all ones: save all bits
212+
hri_sercomspi_baud_reg_t baud_saved_val = hri_sercomspi_get_BAUD_reg(sercom, -1); // -1 mask is all ones: save all bits
213213
// reset
214214
hri_sercomspi_set_CTRLA_SWRST_bit(sercom);
215215
hri_sercomspi_wait_for_sync(sercom, SERCOM_SPI_SYNCBUSY_MASK);
216216
// re-write configurations
217217
hri_sercomspi_write_CTRLA_reg(sercom, ctrla_saved_val);
218218
hri_sercomspi_write_CTRLB_reg(sercom, ctrlb_saved_val);
219-
hri_sercomspi_write_BAUD_reg (sercom, baud_saved_val);
219+
hri_sercomspi_write_BAUD_reg(sercom, baud_saved_val);
220220
hri_sercomspi_wait_for_sync(sercom, SERCOM_SPI_SYNCBUSY_MASK);
221221

222222
// re-enable the sercom

ports/atmel-samd/common-hal/spitarget/SPITarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ typedef struct {
1515
uint8_t MISO_pin;
1616
uint8_t SS_pin;
1717

18-
uint8_t* mosi_packet;
19-
uint8_t* miso_packet;
18+
uint8_t *mosi_packet;
19+
uint8_t *miso_packet;
2020

2121
dma_descr_t running_dma;
2222
} spitarget_spi_target_obj_t;

ports/espressif/bindings/espnow/ESPNow.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ static const mp_stream_p_t espnow_stream_p = {
320320
//| This is an easy way to check if the buffer is empty.
321321
//| """
322322
//| ...
323-
//|
324323
//| def __len__(self) -> int:
325324
//| """Return the number of `bytes` available to read. Used to implement ``len()``."""
326325
//| ...

ports/espressif/tools/update_sdkconfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def update(debug, board, update_all):
195195
ble_enabled = not (value == "0")
196196

197197
os.environ["IDF_TARGET"] = target
198-
os.environ["COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"] = (
199-
f"build-{board}/esp-idf/kconfigs_projbuild.in"
200-
)
198+
os.environ[
199+
"COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"
200+
] = f"build-{board}/esp-idf/kconfigs_projbuild.in"
201201
os.environ["COMPONENT_KCONFIGS_SOURCE_FILE"] = f"build-{board}/esp-idf/kconfigs.in"
202202

203203
kconfig_path = pathlib.Path(f"build-{board}/esp-idf/kconfigs.in")

shared-bindings/_bleio/CharacteristicBuffer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ static void check_for_deinit(bleio_characteristic_buffer_obj_t *self) {
7979
//| :return: Data read
8080
//| :rtype: bytes or None"""
8181
//| ...
82-
//|
8382
//| def readinto(self, buf: WriteableBuffer, nbytes: Optional[int] = None) -> Optional[int]:
8483
//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
8584
//|
@@ -88,7 +87,6 @@ static void check_for_deinit(bleio_characteristic_buffer_obj_t *self) {
8887
//| :return: number of bytes read and stored into ``buf``
8988
//| :rtype: int or None (on a non-blocking error)"""
9089
//| ...
91-
//|
9290
//| def readline(self) -> bytes:
9391
//| """Read a line, ending in a newline character.
9492
//|

shared-bindings/_bleio/Connection.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ void bleio_connection_ensure_connected(bleio_connection_obj_t *self) {
5252
//| Connections may also be made when another device initiates a connection. To use a Connection
5353
//| created by a peer, read the `Adapter.connections` property."""
5454
//| ...
55-
//|
5655
//| def disconnect(self) -> None:
5756
//| """Disconnects from the remote peripheral. Does nothing if already disconnected."""
5857
//| ...

shared-bindings/_bleio/Descriptor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
//| and attached to a Characteristic by calling `add_to_characteristic()`.
2525
//| Remote Descriptor objects are created by `Connection.discover_remote_services()`
2626
//| as part of remote Characteristics in the remote Services that are discovered."""
27-
//|
2827
//| @classmethod
2928
//| def add_to_characteristic(
3029
//| cls,

shared-bindings/_bleio/ScanEntry.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
//| def __init__(self) -> None:
2525
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
2626
//| ...
27-
//|
2827
//| def matches(self, prefixes: ReadableBuffer, *, match_all: bool = True) -> bool:
2928
//| """Returns True if the ScanEntry matches all prefixes when ``match_all`` is True. This is stricter
3029
//| than the scan filtering which accepts any advertisements that match any of the prefixes

shared-bindings/_bleio/ScanResults.c

Lines changed: 0 additions & 2 deletions

0 commit comments

Comments
 (0)