Skip to content

Black on several miscellaneous files - #2498

Merged
peterjc merged 3 commits into
biopython:masterfrom
peterjc:black_misc_bits
Jan 7, 2020
Merged

peterjc merged 3 commits into
biopython:masterfrom
peterjc:black_misc_bits

Conversation

@peterjc

@peterjc peterjc commented Jan 6, 2020

Copy link
Copy Markdown
Member

This pull request addresses in part issue #2008, targeting small modules without an contentious changes.

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run flake8 locally, and
    understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
    tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

@peterjc
peterjc requested review from etal and mdehoon as code owners January 6, 2020 12:39
@peterjc

peterjc commented Jan 6, 2020

Copy link
Copy Markdown
Member Author

@svalqui would you like to review this?

@peterjc

peterjc commented Jan 6, 2020

Copy link
Copy Markdown
Member Author

Realise this overlaps with my own older pull request #2466

@peterjc peterjc mentioned this pull request Jan 6, 2020
3 tasks done
@peterjc

peterjc commented Jan 6, 2020

Copy link
Copy Markdown
Member Author

The changes made on #2466 should be identical, so with that applied, git ought not to find any merge conflicts...

@codecov

codecov Bot commented Jan 6, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #2498 into master will not change coverage.
The diff coverage is 76.23%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2498   +/-   ##
=======================================
  Coverage   84.77%   84.77%           
=======================================
  Files         322      322           
  Lines       52437    52437           
=======================================
  Hits        44456    44456           
  Misses       7981     7981
Impacted Files Coverage Δ
Bio/Sequencing/Applications/_bwa.py 100% <ø> (ø) ⬆️
Bio/KEGG/KGML/KGML_pathway.py 80.3% <0%> (ø) ⬆️
Bio/__init__.py 94.73% <0%> (ø) ⬆️
Bio/triefind.py 97.95% <100%> (ø) ⬆️
Bio/PopGen/GenePop/__init__.py 79.31% <100%> (ø) ⬆️
Bio/NaiveBayes.py 96.34% <100%> (ø) ⬆️
Bio/Crystal/__init__.py 76.49% <100%> (ø) ⬆️
Bio/CAPS/__init__.py 100% <100%> (ø) ⬆️
Bio/Wise/psw.py 69.33% <100%> (ø) ⬆️
Bio/kNN.py 94% <100%> (ø) ⬆️
... and 13 more

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 ac8f07f...f320403. Read the comment docs.

Comment thread Bio/motifs/__init__.py Outdated
"""
warnings.warn("""\
warnings.warn(
"""\

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this slash is not needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually it is (surprisingly) important if you want to avoid a leading newline in the string, see discussion on #2369.

However, in this case there is no strong reason to use triple quotes - I'll tweak this, so I'm glad you queried this.

Comment thread Bio/Data/IUPACData.py
"U": 324.035867
"U": 324.035867,
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The current style for weights is even, after black monoisotopics don't fit in one line, given that is minor I think we just leave black do the styling.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Black added the trailing comma, which other people recommend anyway in lists and dictionaries as it reduced the diff if you later add more entries.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@svalqui

svalqui commented Jan 7, 2020

Copy link
Copy Markdown
Contributor

Only found an slash that could be removed, the rest seems fine to me.

@peterjc

peterjc commented Jan 7, 2020

Copy link
Copy Markdown
Member Author

Thanks you for looking at this so carefully.

@peterjc
peterjc merged commit 1c34585 into biopython:master Jan 7, 2020
@peterjc
peterjc deleted the black_misc_bits branch January 7, 2020 11:09
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.

3 participants