Skip to content

Don't raise StopIteration from generators; return does this explicitl… - #1327

Merged
peterjc merged 1 commit into
biopython:masterfrom
cbrueffer:stopiteration
Jul 20, 2017
Merged

peterjc merged 1 commit into
biopython:masterfrom
cbrueffer:stopiteration

Conversation

@cbrueffer

Copy link
Copy Markdown
Member

…y; fixes #967

@peterjc

peterjc commented Jul 20, 2017

Copy link
Copy Markdown
Member

Looks good - just waiting for AppVeyor to finish, just in case...

@peterjc

peterjc commented Jul 20, 2017

Copy link
Copy Markdown
Member

Note there are still lots more cases to review

@bow

bow commented Jul 20, 2017

Copy link
Copy Markdown
Member

@cbrueffer indeed this looks ok ~ I do also still notice that we still use the raise from other places (e.g. in Bio/AlignIO/MauveIO.py and Bio/AlignIO/PhylipIO.py).

@cbrueffer

cbrueffer commented Jul 20, 2017 •

Copy link
Copy Markdown
Member Author

I've had a look at all "raise StopIteration" cases in the codebase; I think the remaining ones are needed (I could be missing something).

@codecov

codecov Bot commented Jul 20, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #1327 into master will not change coverage.
The diff coverage is 62.5%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1327   +/-   ##
=======================================
  Coverage   84.44%   84.44%           
=======================================
  Files         318      318           
  Lines       48782    48782           
=======================================
  Hits        41193    41193           
  Misses       7589     7589
Impacted Files Coverage Δ
Bio/SeqIO/AbiIO.py 95.94% <0%> (ø) ⬆️
Bio/SearchIO/HmmerIO/hmmer2_text.py 97.48% <0%> (ø) ⬆️
Bio/SearchIO/ExonerateIO/_base.py 98.25% <100%> (ø) ⬆️
Bio/SearchIO/BlastIO/blast_tab.py 87.03% <100%> (ø) ⬆️
Bio/AlignIO/NexusIO.py 92.85% <100%> (ø) ⬆️
Bio/SearchIO/BlatIO.py 97.5% <66.66%> (ø) ⬆️

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 c932e48...c1bf639. Read the comment docs.

@peterjc
peterjc merged commit b99e2f1 into biopython:master Jul 20, 2017
@peterjc

peterjc commented Jul 20, 2017

Copy link
Copy Markdown
Member

Thank you

@cbrueffer

Copy link
Copy Markdown
Member Author

Expanding on this, the cases @bow mentioned don't use yield, so I'm not sure whether this change applies there?

@peterjc

peterjc commented Jul 20, 2017

Copy link
Copy Markdown
Member

Good point. Best run with the PendingDeprecationWarning visible to find out for sure if Python thinks they need fixing...

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.

Update use of StopIteration for PEP479

3 participants