-
Notifications
You must be signed in to change notification settings - Fork 15
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
Do not import pint when it is not needed #1314
Conversation
# Conflicts: # pyiron_base/project/generic.py
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.
I am ok with the changes in general, especially for such a rare used case the recreation of the function is fine with me. However, I wonder if we could not simply do something like
def _size_conversion(size: "pint.Quantity"):
import pint
...
and leave the function where it was?
I do not think that python typing allows defining types as strings. |
@niklassiemer I moved the function to a separate module, this way it can still be imported when somebody wants to use it somewhere else but it is not imported by default. |
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.
LGTM
No description provided.