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

Deprecate backend_ps.get_bbox_header, and split it for internal use. #26960

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Sep 29, 2023

It's clearly an internal helper, and the two parts (the actual bbox header and the rotation command) don't really benefit from being smushed together, so make the function private and split the two parts.

PR summary

PR checklist

@anntzer anntzer added this to the v3.9.0 milestone Sep 29, 2023
def get_bbox_header(lbrt, rotated=False):
"""
Return a postscript header string for the given bbox lbrt=(l, b, r, t).
Optionally, return rotate command.
"""
return _get_bbox_header(lbrt), (_get_rotate_command(lbrt) if rotated else None)
Copy link
Member

Choose a reason for hiding this comment

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

Old behaviour was an empty string

Suggested change
return _get_bbox_header(lbrt), (_get_rotate_command(lbrt) if rotated else None)
return _get_bbox_header(lbrt), (_get_rotate_command(lbrt) if rotated else "")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, fixed.

It's clearly an internal helper, and the two parts (the actual bbox
header and the rotation command) don't really benefit from being smushed
together, so make the function private and split the two parts.
@QuLogic QuLogic merged commit 297507b into matplotlib:main Oct 3, 2023
40 checks passed
@anntzer anntzer deleted the psgbh branch October 3, 2023 10:08
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.

None yet

3 participants