-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Python] revert unnecessary reformat #36094
base: master
Are you sure you want to change the base?
Conversation
This reverts commit dcb4444.
This reimplements project-chip#32257 without reformatting Python files.
Review changes with SemanticDiff. Analyzed 1 of 1 files. Overall, the semantic diff is 100% smaller than the GitHub diff. 1 files do not contain logic changes.
|
PR #36094: Size comparison from 579b1b1 to 498da00 Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
I think that the proper solution for that would be to "somehow" add python formatting to restyled and enforce it during PR. Otherwise, everyone will format the code to their likeness - which introduces unnecessary noise in the code and bloats repo size. I'm not going to mark it as requested changes, but please consider to add codestyle (whatever the codestyle is, IMHO it would be better to have some random and consistent one than noting at all) check to CI. |
We do run autopep8 as part of the pipeline, however, it seems that autopep8 only makes sure that lines are shorter than x, and does not reformat if lines got shortened. Introducing a more forceful approach to formatting probably would introduce quite some change at first. |
We use Python line length of 132 characters. This reverts unnecessary reformat introduced by #32257.
For easier review, this has been implemented with two commits, one which simply reverts #32257, and the second which implements the actual change again.
This has been cross-validated by reformatting with
autopep8
default line length, the effective change ends up to be exactly the same.