-
Notifications
You must be signed in to change notification settings - Fork 3
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
Functional version of evcurve workflow #250
Conversation
|
||
def get_strains( | ||
vol_range: Optional[float], | ||
num_points: Optional[int], |
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.
Doesn't look optional
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.
It is either vol_range
and num_points
or strain_lst
.
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.
It categorically is not. The code as written does not allow vol_range
and num_points
to be optional. It is vol_range
and num_points
, or vol_range
and num_points
(both ignored) and strain_list
.
>>> from atomistics.workflows.evcurve.helper import get_strains
>>>
>>> get_strains(strain_lst=[1,2,3])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[6], line 3
1 from atomistics.workflows.evcurve.helper import get_strains
----> 3 get_strains(strain_lst=[1,2,3])
TypeError: get_strains() missing 2 required positional arguments: 'vol_range' and 'num_points'
You've placed two purely positional arguments with no default and then hinted them as optional.
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.
This is now addressed in #252
No description provided.