-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve plugin options #949
Conversation
parse_query() and make_query() functions.
- Allowed to provide options as dict in the high-level Python API
|
||
Default values may be provided via the `defaults` argument. It | ||
should either be a dict or a string of the same form as `options`. | ||
Arguments: |
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.
Arguments? Instance Variables I suppose? And shouldn't this be in the docstring og the init?
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.
Yes, you are right, the arguments refer to the arguments passed to the __init__()
method. But it is common to document arguments in the class docstring. I like to do it for the following reasons:
- In case the class has both a
__new__()
and a__init__()
method, we don't need to duplicate the argument documentation if we keep it in the class docstring. - The
__new__()
and__init__()
methods starts with an underscore and may be hidden by some documentation systems.
Co-authored-by: Francesca L. Bleken <[email protected]>
Co-authored-by: Francesca L. Bleken <[email protected]>
Co-authored-by: Francesca L. Bleken <[email protected]>
Description
Improve option handling for plugins. This PR tries:
Tasks:
dlite_option_parse()
transparently URL-decode the option stringOptions
Python class transparently URL-decode the option stringType of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.