[Python-Dev] Code formatter bot (original) (raw)
francismb francismb at email.de
Sun Jan 24 10:48:07 EST 2016
- Previous message (by thread): [Python-Dev] Code formatter bot
- Next message (by thread): [Python-Dev] Code formatter bot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, from your valuable feedback, here is what I thing could be a previous requirements list (lets call it for e.g. autopep7 script by now):
- It should follow PEP 7 :-)
- It should check PEP 7 compliance on a per file basis (for simplicity)
- It should be embeddable on the test suite, returning PASS or FAILURE
- It should be usable as a pre-commit hook
- It could return a patch to apply to the non compliant file making it compliant
- It could return the lines (an the reason why) that aren't compliant
Some other details on using some autopep7 on the infrastructure (as part of a workflow, by wrapping or enhancing it):
It could be used it on a regular basis against the cpython repo to be able to see how much files doesn't follow PEP 7. The first time shows the legacy ones (plus the current failures).
It should be used in pair with a "skip" list to avoid checking the legacy code mentioned (or a list of pairs file:reason to skip).
It could be used on the CI-side to flag PEP 7 compliance (core-devs doesn't have to need to point to that in reviews). Or could be used as a part of series of checks that generate a "ready-to-review" flag.
It could be used to continually check and proposes patches (on bug.python.org).
It could be used to continually check, log the issue on the tracker and commit the patch to the cpython repository.
Regards, francis
- Previous message (by thread): [Python-Dev] Code formatter bot
- Next message (by thread): [Python-Dev] Code formatter bot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]