You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for applying small PEP8 changes like white space which do NOT alter the code behaviour, and discussion of dividing labour to avoid stepping on each other's toes. i.e. You can comment here if you are planning to work on a batch of modules.
I think almost all PEP8 fixes in base code and tests are completed by now. Although there might be very few style errors that managed to remain unnoticed.
Note that the pre-commit hook is ignoring many errors that will be triggered by PEP8 tools.
The pre-commit hook has some PEP8 options turned off, so the same results should be achieved with the PEP8 tools as long as we choose the same options, right?
Exactly, the commit hook uses the pep8 tool internally. Great work on the PEP8 fixes everyone, nice to see so much progress!
I think any classes that have been fixed throughout the repository and that are currently disabled in the hook should be enabled, so things don't deteriorate.
It would need to be checked if any of the ignored error codes in the hook can be removed. My guess is that it would be necessary another pass through the base code to fix any PEP8 error class before removing it from the hook.
Having been using the commit hook on (some of) my own machines, there are still plenty of (harmless) white space issues in the code base which do not follow PEP8, e.g. spaces around mathematical operators. I've been fixing this as an when I happen to touch a file for another reason.
I included these exceptions in my pre-commit hook:
E261 at least two spaces before inline comment
E225 missing whitespace around operator
E226 missing whitespace around arithmetic operator
E227 missing whitespace around bitwise or shift operator
E228 missing whitespace around modulo operator
Having been using the commit hook on (some of) my own machines, there are
still plenty of (harmless) white space issues in the code base which do not
follow PEP8, e.g. spaces around mathematical operators. I've been fixing
this as an when I happen to touch a file for another reason.
—
Reply to this email directly or view it on GitHub #406 (comment).
Yes, and in general I found following these makes the code a little bit clearer - although for some of the more complex mathematical formulas it can be useful to omit the spaces around multiplication, to emphasise visually that happens before any addition/subtraction.
Activity
carlosp420 commentedon Nov 19, 2014
I think almost all PEP8 fixes in base code and tests are completed by now. Although there might be very few style errors that managed to remain unnoticed.
Note that the pre-commit hook is ignoring many errors that will be triggered by PEP8 tools.
twrightsman commentedon Nov 19, 2014
The pre-commit hook has some PEP8 options turned off, so the same results should be achieved with the PEP8 tools as long as we choose the same options, right?
cbrueffer commentedon Nov 19, 2014
Exactly, the commit hook uses the pep8 tool internally. Great work on the PEP8 fixes everyone, nice to see so much progress!
I think any classes that have been fixed throughout the repository and that are currently disabled in the hook should be enabled, so things don't deteriorate.
Do such classes exist?
Cheers,
Chris
carlosp420 commentedon Nov 20, 2014
It would need to be checked if any of the ignored error codes in the hook can be removed. My guess is that it would be necessary another pass through the base code to fix any PEP8 error class before removing it from the hook.
peterjc commentedon Jan 5, 2015
Having been using the commit hook on (some of) my own machines, there are still plenty of (harmless) white space issues in the code base which do not follow PEP8, e.g. spaces around mathematical operators. I've been fixing this as an when I happen to touch a file for another reason.
carlosp420 commentedon Jan 5, 2015
I included these exceptions in my pre-commit hook:
E261 at least two spaces before inline comment
E225 missing whitespace around operator
E226 missing whitespace around arithmetic operator
E227 missing whitespace around bitwise or shift operator
E228 missing whitespace around modulo operator
as suggested here
http://mailman.open-bio.org/pipermail/biopython-dev/2014-October/020748.html
Maybe those are the spaces that you keep finding?
On Mon, Jan 5, 2015 at 1:18 PM, Peter Cock [email protected] wrote:
peterjc commentedon Jan 6, 2015
Yes, and in general I found following these makes the code a little bit clearer - although for some of the more complex mathematical formulas it can be useful to omit the spaces around multiplication, to emphasise visually that happens before any addition/subtraction.
PEP8 white space before comments, helped by autopep8 E261
Lots of PEP8 operator white space changes using autopep8
PEP8 blank lines (autopep8 E302)
Selective use of autopep8 to remove whitespace after commas
PEP8 whitespace; W293 and E231
Remove redundant string operators; PEP8 whitespace
peterjc commentedon Mar 25, 2015
I'm going to mark this as closed, and focus next on adopting the pre-commit git hook, new issue #493