adafruit / Adafruit_CircuitPython_Ducky

CircuitPython library for running DuckyScript
MIT License
19 stars 7 forks source link

Fix some white spaces and empty lines bugs #10

Closed ramsrq closed 1 year ago

ramsrq commented 1 year ago

Some issues are detected when:

There are white spaces before and/or after a token when send press multiple keys
There is a empty line at the end of the file (index out of bound)
When default delay is modified, single or multiple key remain pressed during default delay period.

144: Fix white spaces after line 189: Prevent from key still pressed when default delay is more than zero. 202: Prevent error index out of bound whet read last line 203: Fix an error when press multiples key that skip the next execution line.

ramsrq commented 1 year ago

Any advice of how address the precheck error in TEST task? Error: black....................................................................Failed Error: reformatted adafruit_ducky.py Error: Process completed with exit code 1.

image

https://github.com/adafruit/Adafruit_CircuitPython_Ducky/actions/runs/4624950791/jobs/8180264741?pr=10

tekktrik commented 1 year ago

You can fix the CI errors by using pre-commit, which will help/handle linting and reformatting your code the same way the CI does. You can find information on downloading and using pre-commit here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code