circuitpython/shared-bindings/canio
Jeff Epler 907c5d387f
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.
2022-09-30 11:18:13 -05:00
..
CAN.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
CAN.h Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
Listener.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
Listener.h CAN: Use mp_obj_t insteaed of canio_message_obj_t, get rid of rtr field 2020-09-28 17:22:00 -05:00
Match.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
Match.h Match: address -> id 2020-09-28 17:22:00 -05:00
Message.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
Message.h canio: remove stray remote_transmission_request method declaration 2020-09-28 17:22:02 -05:00
RemoteTransmissionRequest.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
RemoteTransmissionRequest.h canio: RemoteTransmissionRequest: Split implementation, keep one structure 2020-09-28 17:22:00 -05:00
__init__.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
__init__.h canio: rename from _canio 2020-09-21 16:44:26 -05:00