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

translate: Fix error handling of reference sequence features #1168

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Feb 24, 2023

Description of proposed changes

Previously, the error message was never reached because len(features) would raise another error:

TypeError: object of type 'NoneType' has no len()

Switching the order allows for the intended error handling to happen.

Related issue(s)

Fixes uncaught error in #1151.

Testing

No testing as I'm not sure how to reproduce this scenario, but I think this is a trivial change.

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

Previously, the error message was never reached because len(features)
would raise another error:

    TypeError: object of type 'NoneType' has no len()

Switching the order allows for the intended error handling to happen.
@victorlin victorlin requested a review from a team February 24, 2023 19:22
@victorlin victorlin self-assigned this Feb 24, 2023
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Base: 68.17% // Head: 68.17% // No change to project coverage 👍

Coverage data is based on head (f192902) compared to base (6c9a901).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1168   +/-   ##
=======================================
  Coverage   68.17%   68.17%           
=======================================
  Files          63       63           
  Lines        6752     6752           
  Branches     1654     1654           
=======================================
  Hits         4603     4603           
  Misses       1841     1841           
  Partials      308      308           
Impacted Files Coverage Δ
augur/translate.py 74.60% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@victorlin victorlin merged commit 8437dcf into master Feb 24, 2023
@victorlin victorlin deleted the victorlin/fix-translate-error-handling branch February 24, 2023 21:34
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.

BUG: Augur translate falsely claims BCBio.GFF not found when no features file passed
2 participants