circuitpython/shared-bindings/digitalio
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
..
DigitalInOut.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
DigitalInOut.h cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Direction.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
Direction.h Add externs. GCC10 complains about duplicate defines 2020-07-22 16:26:46 -07:00
DriveMode.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
DriveMode.h Add externs. GCC10 complains about duplicate defines 2020-07-22 16:26:46 -07:00
Pull.c Tweak black_bindings 2022-09-30 11:18:13 -05:00
Pull.h countio: add selectable rise and fall detection, pulls 2021-12-31 16:34:58 -05:00
__init__.c Make other documentation links prettier 2022-05-13 11:51:30 -04:00
__init__.h Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master. 2017-08-25 22:17:07 -04:00