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

Make unit converters also handle instances of subclasses.#13536

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
dstansby merged 1 commit intomatplotlib:masterfromanntzer:unit-subclasses
Jun 11, 2019

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedFeb 27, 2019
edited
Loading

PR Summary

Closes#11275.

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

@dopplershift
Copy link
Contributor

Would it be better to make the cache subclass dict and encapsulate the behavior there?

@anntzer
Copy link
ContributorAuthor

It already subclasses dict and the "dict" interface is used for registering converters, which does not go through this logic; so keeping the entire get_converter logic in a separate method looks better to me.

@mhvk
Copy link
Contributor

Just ran into this bug in astropy and have createdastropy/astropy#8818 to work around it by registering all subclasses of ourQuantity class. It would be nice to have this fix instead. Beyond the rebase, is there something that can be done to help get it in?

@anntzer
Copy link
ContributorAuthor

rebased

@dstansbydstansby added this to thev3.2.0 milestoneJun 11, 2019
@dstansbydstansby merged commit8e57e5d intomatplotlib:masterJun 11, 2019
@anntzeranntzer deleted the unit-subclasses branchJune 11, 2019 11:29
@anntzeranntzer mentioned this pull requestJan 13, 2020
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.2.0
Development

Successfully merging this pull request may close these issues.

A "TypeError" is raised if subclass inherited from "datetime" is used
5 participants
@anntzer@dopplershift@mhvk@timhoffm@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp