-
Notifications
You must be signed in to change notification settings - Fork 301
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
Validator for callables as parameter #650
Conversation
qcodes/utils/validators.py
Outdated
pass | ||
|
||
def validate(self, value, context=''): | ||
if not hasattr(value, '__call__'): |
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.
Any reason to not use if not callable(value)
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.
Good suggestion, I'll make the change.
Looks good to me apart from a single inline comment |
@jenshnielsen , I addressed your comments, let me know what you think. |
@AdriaanRol Great looks good to me |
Author: Adriaan <AdriaanRol@users.noreply.github.com> Validator for callables as parameter (#650)
* Validator for callables as parameter * Addressed comment by jenshnielsen
* Validator for callables as parameter * Addressed comment by jenshnielsen
Changes proposed in this pull request:
@giulioungaretti