Skip to content

Added context managers to lockdraw #25987

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

Closed

Conversation

thiagoluisbecker
Copy link
Contributor

PR summary

closes #24703
Implemented enter and exit on LockDraw class following the suggestion made in the issue.

PR checklist

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@anntzer
Copy link
Contributor

anntzer commented May 26, 2023

As noted in #24703 (comment) I'm not really sure we want this.

@thiagoluisbecker
Copy link
Contributor Author

Hello! Alright! I Implemented just in case it was necessary on a further future.

@timhoffm
Copy link
Member

timhoffm commented Jun 1, 2023

Thanks for the contribution.

We will not carry code around that we do not need right now. If we need something later we can always implement it then.

The way forward here is to check the call sites of the lock whether it can actually be applied as the context manager in our code (as proposed in #24703 (comment)). If there are such cases, this PR should rewrite them. If not, my assumtion that a context manager is useful was wrong.

@timhoffm
Copy link
Member

timhoffm commented Feb 2, 2025

Closing as it’s not clear this is actually helpful. See the discussion in the original issue. Sorry for setting a wrong track.

@timhoffm timhoffm closed this Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

[ENH]: Turn widgets.LockDraw into a context manager
3 participants