Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BrunoWolf03
Copy link

As recommended by @rcomer i just used the decorator to take care of the issue.

Comment on lines +3 to 4
from matplotlib._api.deprecation import delete_parameter
from matplotlib import _docstring
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from matplotlib._api.deprecation import delete_parameter
from matplotlib import _docstring
from matplotlib import _api, _docstring

By convention we import our interal helper modules this way.

Comment on lines +223 to +225
@delete_parameter("3.9", "tricontour", "origin")
@delete_parameter("3.9", "tricontour", "extent")

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@delete_parameter("3.9", "tricontour", "origin")
@delete_parameter("3.9", "tricontour", "extent")
@_api.delete_parameter("3.9", "origin")
@_api.delete_parameter("3.9", "extent")

This is how you'd use the decorator. The func parameter is not passed in explicitly but comes from the decoration.

That said, I'm not sure whether the decorator works for parameters passed via **kwargs.

Copy link
Member

Choose a reason for hiding this comment

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

Also, "3.9" should be replaced with the version it is deprecated in (right now it looks like "3.11").

Copy link
Member

Choose a reason for hiding this comment

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

That said, I'm not sure whether the decorator works for parameters passed via **kwargs.

It's fine in **kwargs, at least by documentation.

@oscargus
Copy link
Member

Also, tricontourf should have the same thing and there should be a deprecation note, see https://matplotlib.org/devdocs/devel/api_changes.html#announce-changes-deprecations-and-new-features (the fourth checkmark).

@melissawm melissawm moved this to Waiting for author in First Time Contributors May 22, 2025
@BrunoWolf03 BrunoWolf03 closed this by deleting the head repository Jun 4, 2025
@QuLogic
Copy link
Member

QuLogic commented Jun 5, 2025

Did you intend to close this PR? I see that this PR uses your main branch, and you've opened a new PR from main again. Working from a single branch will cause conflicts like these, which is why we recommend creating a feature branch for each PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting for author

Development

Successfully merging this pull request may close these issues.

4 participants