Skip to content

Style check: Ignore W503 - #1503

Merged
peterjc merged 2 commits into
biopython:masterfrom
MarkusPiotrowski:ignore_W503
Jan 12, 2018
Merged

peterjc merged 2 commits into
biopython:masterfrom
MarkusPiotrowski:ignore_W503

Conversation

@MarkusPiotrowski

Copy link
Copy Markdown
Contributor

PEP8 now recommends to break lines before binary operators. Thus we should ignore flake8's warning W503: Line break before binary operator.

@MarkusPiotrowski

Copy link
Copy Markdown
Contributor Author

hmm, Travis CI failed on pypy-5.7.1. That's unlikely related to my changes in the .flake8 files?

@peterjc

peterjc commented Jan 11, 2018

Copy link
Copy Markdown
Member

Agreed, I've restarted it but the PyPy failure is unrelated:

$ bash -c \cd Tests && python run_tests.py --offline\
test_Ace ... ok
test_Affy ... ok
test_AlignIO ... /bin/bash: line 2:  6255 Segmentation fault      (core dumped) python run_tests.py --offline
ERROR: InvocationError: '/bin/bash -c \\cd Tests && python run_tests.py --offline\\'

Comment thread Bio/.flake8 Outdated
# ================================================
# W503 Line break before binary operator
# PEP8 is now in favour of line-breaks before binary operators
W503

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this at line 10 of the file with the other flake8 built in codes please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add ,W501, to line 10? (and also in the other .flake8 files, of course)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be fine, thanks.

Looking at this afresh, we could list the non-default ignores explicitly (as they make be good targets for future enforcement).

Comment thread BioSQL/.flake8 Outdated
# ================================================
# W503 Line break before binary operator
# PEP8 is now in favour of line-breaks before binary operators
W503

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The W* codes are part of the flake8 core, so can you put this first on the list?

Comment thread Scripts/.flake8 Outdated
# ================================================
# W503 Line break before binary operator
# PEP8 is now in favour of line-breaks before binary operators
W503

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this at line 10 of the file with the other flake8 built in codes please?

Comment thread Tests/.flake8 Outdated
# ================================================
# W503 Line break before binary operator
# PEP8 is now in favour of line-breaks before binary operators
W503

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this at line 9 of the file with the other flake8 built in codes please?

@peterjc peterjc mentioned this pull request Jan 11, 2018
@codecov

codecov Bot commented Jan 11, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #1503 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1503      +/-   ##
==========================================
- Coverage   84.79%   84.79%   -0.01%     
==========================================
  Files         323      323              
  Lines       49393    49393              
==========================================
- Hits        41884    41882       -2     
- Misses       7509     7511       +2
Impacted Files Coverage Δ
Bio/NeuralNetwork/Gene/Schema.py 71.07% <0%> (-0.83%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3628959...35a1a4a. Read the comment docs.

@MarkusPiotrowski

Copy link
Copy Markdown
Contributor Author

@peterjc In \Scripts\.flake8 line 10, containing all the flake8 core ignores, is out-commented. Is this correct?

@peterjc

peterjc commented Jan 11, 2018

Copy link
Copy Markdown
Member

Looks like you could remove that comment line in Scripts/.flake8 then?

@MarkusPiotrowski

Copy link
Copy Markdown
Contributor Author

Travis CI exited with "137" on the Python 2.7 build, obviously not related to Biopython:

Bio.SVDSuperimposer docstring test ... ok
----------------------------------------------------------------------
Ran 279 tests in 1152.209 seconds

Skipping any tests requiring internet access
Python version: 2.7.14 (default, Nov 28 2017, 18:46:37) 
[GCC 4.8.4]
Operating system: posix linux2


The command "travis_wait tox -c .travis-tox.ini -e $TOXENV" exited with 137.

@peterjc
peterjc merged commit ba225cf into biopython:master Jan 12, 2018
@peterjc

peterjc commented Jan 12, 2018

Copy link
Copy Markdown
Member

Yep, not sure what that TravisCI failure was, but clearly unrelated to this pull request.

Thank you!

@MarkusPiotrowski
MarkusPiotrowski deleted the ignore_W503 branch January 12, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants