-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add code formatting and translations check #4362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for doing this! Looks like it needs to be rerun again. Please ping be when it's ready and we'll get it in. We'll also need to teach folks how to run it on any new or pending code as well. Is there a way to check the formatting in the CI via pre-commit? |
Ya... this needs some coordination to avoid conflicts.
Yes, we can have that. This currently fails Run MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
Traceback (most recent call last):
File "./run-tests", line 615, in <module>
main()
File "./run-tests", line 606, in main
res = run_tests(pyb, tests, args, base_path, args.jobs)
File "./run-tests", line 286, in run_tests
upy_float_precision = int(run_feature_check(pyb, args, base_path, 'float.py'))
ValueError: invalid literal for int() with base 10: b'64_0x0a_\n'
Error: Process completed with exit code 1. |
@microdev1 the formatting changes in |
@microdev1 ping -- did the above comment enable you to move forward or are you still stuck with the same problem when reverting py/qstrdefs.h? |
- add formatting check - add translations check
@tannewt I have added formatting check to pre-commit along with translations check.
@jepler Thanks! for digging into this. :) |
Seems like |
The problem is due to the added line in cmd_showbc.py. As far as I can tell, when the expected file has something like
it searches for a line that matches this regular expression, and then checks all the subsequent lines until the next https://gist.github.com/8293402cffa2d8dfc3bbc80786988151 fixes this test by updating all the line numbers. |
Thanks! @jepler. That solved the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't noticed the translations check part -- thank you for everything!
Ran
tools/codeformat.py
script ported from MicroPython with slight modifications:// |
back to//|
for docs.