Draft
Conversation
Contributor
Author
|
Marking as Draft since there are no tests to back it up. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
=======================================
Coverage 81.86% 81.86%
=======================================
Files 93 93
Lines 19030 19030
Branches 3047 3047
=======================================
Hits 15578 15578
Misses 2949 2949
Partials 503 503 ☔ View full report in Codecov by Sentry. |
This reduces complexity in main() while also addressing the unbound crashid issue that showed up in Noble, albeit only partially: now it's not unbound, but it can be None, which is another can of worms. Baby steps!
As it turns out testing for `options.report` being falsy meant that crashid was defined, but I'd rather test it directly as it's a bit cumbersome to trace (and it made pylint crazy).
While the contextmanager method is still too complex, it's another step towards reducing the overall complexity of the file.
8493a93 to
7418eb2
Compare
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A couple of commits that split out some code out of apport-retrace's main() and into helper functions.
Depends on #295