-
Notifications
You must be signed in to change notification settings - Fork 468
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
Add get_application_registry (plus prettify) #738
Conversation
pint/__init__.py
Outdated
""" | ||
Get the application registry which is used for unpickling operations. | ||
""" | ||
assert isinstance(registry, UnitRegistry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe I am missing something, but... where is the registry
variable defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously you're not and I was so focused on the pickle part that I did not even check the get_app_registry because it looked "so simple to do", and forgot to delete this line...
I'm having trouble understanding the check that fails with travis... could you help me out? EDIT: by the way, do you want me to add some Travis checks? Given what I just did before, it would probably be a good idea to check that the function executes correctly... |
While we're at it, why don't we update the docs to mention the |
Ok, I'll try to update the doc at some point. However, I still don't know why this call to data causes the pytest error on L967... and I don't think this has anything to do with my PR. |
Hey, there! |
Closing this due to #880 |
This PR adresses #716 and helps solve #725.
I also moved the
__repr__
toPrettyIPython
so as not to shadow the pretty representation.Because the doc uses the tuples with pickle, I also added a warning when making tuples, though I don't understand why you do not advocate for direct pickling...
Checks are made in
UnitsContainer
to avoid issues with multiple inheritance hierarchies in quantities and units