Skip to content

Unify quotes - prefer double quotes - #2192

Merged
peterjc merged 8 commits into
biopython:masterfrom
peterjc:unify_quotes
Aug 2, 2019
Merged

peterjc merged 8 commits into
biopython:masterfrom
peterjc:unify_quotes

Conversation

@peterjc

@peterjc peterjc commented Jul 29, 2019

Copy link
Copy Markdown
Member

This pull request addresses part of the changes which black would include, see #2008. See discussion there.

These changes were made using https://github.com/myint/unify but I have deliberately set the author to a dummy values of unify <[email protected]> to avoid inflating my commit count.

  • 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.)

@tiagoantao tiagoantao left a comment

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.

On an aestehic level, I would prefer the opposite direction.

But the important point is to have a convention and stick with it. If double quotes, then double quotes it is.

@codecov

codecov Bot commented Jul 29, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #2192 into master will increase coverage by <.01%.
The diff coverage is 79.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2192      +/-   ##
==========================================
+ Coverage   84.61%   84.62%   +<.01%     
==========================================
  Files         317      317              
  Lines       51442    51452      +10     
==========================================
+ Hits        43529    43542      +13     
+ Misses       7913     7910       -3
Impacted Files Coverage Δ
Bio/phenotype/phen_micro.py 85.82% <ø> (ø) ⬆️
Bio/motifs/__init__.py 80.71% <ø> (ø) ⬆️
Bio/SubsMat/FreqTable.py 97.36% <ø> (ø) ⬆️
Bio/SearchIO/_model/query.py 91.5% <ø> (ø) ⬆️
Bio/SeqIO/UniprotIO.py 91.96% <ø> (ø) ⬆️
Bio/SearchIO/__init__.py 90.24% <ø> (ø) ⬆️
Bio/_utils.py 56.25% <ø> (ø) ⬆️
Bio/codonalign/__init__.py 73.5% <ø> (ø) ⬆️
Bio/UniGene/__init__.py 91.6% <ø> (ø) ⬆️
Bio/Sequencing/Applications/_Novoalign.py 100% <ø> (ø) ⬆️
... and 203 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 c4bb783...2a9d7ac. Read the comment docs.

@bow bow left a comment

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.

This looks fine ~ and I do also prefer " over '.

@peterjc

peterjc commented Jul 31, 2019

Copy link
Copy Markdown
Member Author

I think #2008 (comment) can be taken as an approval from @MarkusPiotrowski on standardising on double quotes.

@MarkusPiotrowski

Copy link
Copy Markdown
Contributor

Yes, please do it.

@peterjc

peterjc commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

@mdehoon do you want to veto this quote style change, or are you OK with the changes?

@peterjc

peterjc commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

I note there is now a merge conflict - I can quite easily redo this and resolve that, if there is agreement on the principle of the changes.

@mdehoon

mdehoon commented Aug 2, 2019

Copy link
Copy Markdown
Contributor

@mdehoon do you want to veto this quote style change, or are you OK with the changes?

I am fine either way.

unify and others added 8 commits August 2, 2019 13:04
Using the https://github.com/myint/unify for this:

$ unify --quote \" --in-place setup.py Scripts/*.py Scripts/*/*.py Doc/*/*.py  Doc/*/*/*.py
Using https://github.com/myint/unify for this:

$ unify --quote \" --in-place Bio/*.py Bio/*/*.py Bio/*/*/*.py
$ git checkout Bio/Restriction/Restriction_Dictionary.py

Note excluded automatically generated file
Bio/Restriction/Restriction_Dictionary.py
Note this possibly surprising behaviour:

>>> "\""
'"'

This avoids the confusing form.
@peterjc

peterjc commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

Rebasing...

@peterjc

peterjc commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

Thank you all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants