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 ArtistInspector.get_aliases.#12037

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
jklymak merged 1 commit intomatplotlib:masterfromanntzer:artistinspector
Sep 10, 2018

Conversation

anntzer
Copy link
Contributor

The docstring parsing in get_aliases was brittle and didn't handle the
final dot that cbook._define_aliases added to the docstring, so as of
master it would return the keys with an additional dot. Instead, use a
regex which will loudly error out if the format is incorrect.

Also replace {key: None, ...} mapping simulating a set to, well, a set.
(The use of sets instead of lists was added ined9c2b5 apparently to
handle the case where the same alias is added twice.)

(Yes, the whole alias machinery could now be simplified e.g. by adding
anis_mpl_alias attribute on the aliases instead.)

At least the parsing fix should be considered RC as the issue came in in
#9475.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzeranntzer added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelSep 6, 2018
@anntzeranntzer added this to thev3.0 milestoneSep 6, 2018
The docstring parsing in get_aliases was brittle and didn't handle thefinal dot that cbook._define_aliases added to the docstring, so as ofmaster it would return the keys with an additional dot.  Instead, use aregex which will loudly error out if the format is incorrect.Also replace {key: None, ...} mapping simulating a set to, well, a set.(The use of sets instead of lists was added ined9c2b5 apparently tohandle the case where the same alias is added twice.)(Yes, the whole alias machinery could now be simplified e.g. by addingan `is_mpl_alias` attribute on the aliases instead.)
Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

Seems fine to me. I guess get_aliases is almost internal API that we don't need to worry about the API change too much?

@anntzer
Copy link
ContributorAuthor

If you consider get_aliases to be public API, then the exact format of the alias docstrings also becomes public API, which sounds... awkward.

@jklymakjklymak merged commit46eb9b6 intomatplotlib:masterSep 10, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 10, 2018
@anntzeranntzer deleted the artistinspector branchSeptember 10, 2018 17:29
tacaswell added a commit that referenced this pull requestSep 10, 2018
…037-on-v3.0.xBackport PR#12037 on branch v3.0.x (Fix ArtistInspector.get_aliases.)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

3 participants
@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp