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

Some apport-retrace refactoring #297

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

schopin-pro
Copy link
Contributor

A couple of commits that split out some code out of apport-retrace's main() and into helper functions.

Depends on #295

@schopin-pro
Copy link
Contributor Author

Marking as Draft since there are no tests to back it up.

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69e81cf) 81.86% compared to head (7418eb2) 81.86%.

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.
📢 Have feedback on the report? Share it here.

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

1 participant