Skip to content

MNT: Remove redundant method, fix signature and add doc-string to draw_tex #24182

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

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

oscargus
Copy link
Member

PR Summary

Doc-string is maybe not required as it is so close to draw_text, but still...

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@@ -693,9 +693,9 @@ def draw_image(self, gc, x, y, im, transform=None):
interp, w, h, fname_img))
_writeln(self.fh, r"\end{pgfscope}")

def draw_tex(self, gc, x, y, s, prop, angle, ismath="TeX", mtext=None):
def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None):
Copy link
Member

Choose a reason for hiding this comment

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

Can we do this without deprecation?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unclear. It is not used and was deprecated from all other draw_tex methods in #17484. However, it seems to have been forgotten for the pgf backend.

Copy link
Member Author

Choose a reason for hiding this comment

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

The deprecations were removed in #19900 and while it was touched, it does not seem like anyone noticed that the signature was different.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, let's try.

@story645 story645 added this to the v3.7.0 milestone Oct 16, 2022
@tacaswell tacaswell merged commit d6e2548 into matplotlib:main Oct 20, 2022
@oscargus oscargus deleted the draw_tex branch October 20, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants