Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unreachable statements #4603

Merged
merged 2 commits into from Sep 13, 2017

Conversation

Projects
None yet
2 participants
@erasche
Copy link
Member

commented Sep 13, 2017

No description provided.

@@ -256,7 +256,6 @@ def __iter__(self):
"""
if self.limit is not None and self.limit <= 0:
return
yield

This comment has been minimized.

Copy link
@erasche

erasche Sep 13, 2017

Author Member

since my memory was that python wouldn't allow yield + return to co-exist, it seems it will just throw an exception.

>>> def a():
...   yield 1
...   if True:
...     yield 2
...     return
... 
>>> a()
<generator object a at 0x7f760f80e870>
>>> q = a()
>>> q.next()
1
>>> q.next()
2
>>> q.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
>>> 
@mvdbeek
Copy link
Member

left a comment

Looks good, thanks @erasche!

@mvdbeek

This comment has been minimized.

Copy link
Member

commented Sep 13, 2017

Ah, there are some unused imports now:

lib/galaxy/datatypes/dataproviders/dataset.py:11:1: F401 'bx.bbi as bx_bbi' imported but unused
lib/galaxy/jobs/runners/state_handlers/_safe_eval.py:1:1: F401 're' imported but unused

@mvdbeek mvdbeek merged commit e33b35d into galaxyproject:dev Sep 13, 2017

6 checks passed

api test Build finished. 292 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 161 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 45 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
@mvdbeek

This comment has been minimized.

Copy link
Member

commented Sep 13, 2017

Thanks @erasche

@mvdbeek mvdbeek modified the milestones: 17.09, 18.01 Sep 13, 2017

@erasche erasche deleted the erasche:dead-code branch Sep 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.