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

Catch errors and log in _dispose in PluginContext #325

Merged
merged 7 commits into from
Nov 27, 2023

Conversation

lucyleeow
Copy link
Contributor

When running the dispose functions in _dispose in PluginContext, catch errors and log instead of raising.

Suggested by Talley in: pyapp-kit/app-model#147 (comment)

@lucyleeow
Copy link
Contributor Author

cc @DragaDoncila

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6612e8c) 100.00% compared to head (aebecfd) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #325   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         2774      2779    +5     
=========================================
+ Hits          2774      2779    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DragaDoncila
Copy link
Contributor

@lucyleeow thanks for opening! The failures are unrelated and I think should be addressed in a separate PR. However, it would be good to add a test for the dispose bit to get coverage back up to 100

@lucyleeow
Copy link
Contributor Author

@DragaDoncila I think this is ready for review now, test added!

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks @lucyleeow!

@lucyleeow
Copy link
Contributor Author

Maybe this could go in now...?

@DragaDoncila DragaDoncila merged commit f9f35ea into napari:main Nov 27, 2023
31 checks passed
@lucyleeow lucyleeow deleted the dispose_catch branch November 27, 2023 03:22
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.

3 participants