-
Notifications
You must be signed in to change notification settings - Fork 472
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
Enrico/bug context #1944
base: master
Are you sure you want to change the base?
Enrico/bug context #1944
Conversation
CodSpeed Performance ReportMerging #1944 will degrade performances by 27.45%Comparing Summary
Benchmarks breakdown
|
If I understand correctly, the problem is that after adding definitions, the cache is not rebuilt. Right? I think I have a better solution. I will try to put it in another PR |
@hgrecco Yes, the problem is that when the context is enabled the cache should be rebuilt otherwise currently an exception is raised. |
pre-commit run --all-files
with no errorsI fixed a bug related to unit conversion when using context. Without the single line change in
pint/facets/context/registry.py
callingcompatible_units
fails withKeyError: <UnitsContainer({'[mass]': 1, '[time]': -1})>
.I hope this change can be merged and released soon!