Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix semantics of MEP22 image names.#27492

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:mainfromanntzer:mep22imagename
Mar 14, 2024

Conversation

anntzer
Copy link
Contributor

See writeup in changelog note.Closes#27400.

@tacaswell I think the behavior here also handles the use case you mention at#27400 (comment).

PR summary

PR checklist

@anntzeranntzer added the MEP: MEP22tool manager labelDec 10, 2023
@tacaswell
Copy link
Member

Seems a bit overkill, but 👍🏻

I think we should always return an absolute path. Minor preference we move to pathlib internally but 🤷🏻 either way.

@tacaswelltacaswell added this to thev3.9.0 milestoneDec 11, 2023
See writeup in changelog note.
@anntzeranntzerforce-pushed themep22imagename branch 2 times, most recently froma205ac3 to8470189CompareDecember 11, 2023 22:19
@anntzer
Copy link
ContributorAuthor

Switched to returning an absolute path. Like most people(?) I also prefer pathlib, but the return value immediately gets passed to add_toolitem, which is documented to take a str as input (and is technically something overridable by third-party backends) and I don't really want to bother changing that (especially as the filename will typically then get passed to a gui toolkit code to load the icon, and these typically don't actually support pathlib but plain str paths). So overall in this specific case I'm not convinced it's worth switching to returning a Path that'll immediately get converted back to a str (but I don't feel strongly either way).

Copy link
Member

@QuLogicQuLogic left a comment
edited
Loading

Choose a reason for hiding this comment

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

This will break webagg, which expects an image basename (which is mapped to a FontAwesome icon as a class name), which doesn't appear to be stripped of the new prefix here. It may also affectipympl.

@anntzer
Copy link
ContributorAuthor

I don't think it does? Both backends only implement the classic toolbar2, not mep22 toolmanager.

Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

Indeed, you are correct about that. Looks good to me then.

@timhoffmtimhoffm merged commitfef38dd intomatplotlib:mainMar 14, 2024
@drmcnelson
Copy link

Thank you

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

@tacaswelltacaswelltacaswell left review comments

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
MEP: MEP22tool manager
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

[Bug]: tk backend confused by presence of file named "move" in current working directory
5 participants
@anntzer@tacaswell@drmcnelson@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp