-
Notifications
You must be signed in to change notification settings - Fork 316
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
Smaller changes to parameters #788
Merged
WilliamHPNielsen
merged 25 commits into
microsoft:master
from
jenshnielsen:fix_parameters
Oct 16, 2017
Merged
Smaller changes to parameters #788
WilliamHPNielsen
merged 25 commits into
microsoft:master
from
jenshnielsen:fix_parameters
Oct 16, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mp' into fix_parameters
This is how the official documentation does it and avoids a number of linter warnings
WilliamHPNielsen
approved these changes
Oct 11, 2017
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 think this looks good.
Hey @jenshnielsen had a look, and the changes look good! I also stumbled on a couple of them.
|
|
The wrapping happens in the BaseParameter, not the Parameter. The Parameter
only performs it's own wrapping if an explicit get/set_cmd is provided. The
wrapper functionalities are meant to also be usable for other parameter
types. Therefore I thought it would be a good idea to have get/set_raw also
common for all parameter types
…On Thu, Oct 12, 2017, 7:16 PM Jens Hedegaard Nielsen < ***@***.***> wrote:
1. It was a linter warning. I have reverted if for now. We can always
look into this later
2. The logic to actually wrap the parameter is only implemented in
Parameter, not in BaseParamter so if you subclass BaseParamter you
will have to explicitly wrap your get command. You are of course free to
use the wrapper in your subclass anyway as in you can implement a get_raw
and wrap it in the subclass or implement a get command and either wrap it
or not as works for your parameter.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#788 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGgLHcLcx9E3AM0xx5z6xRXJ-ijtMQ2bks5srcrUgaJpZM4Pz7yn>
.
|
Sorry missed that. Should be fixed now |
giulioungaretti
pushed a commit
that referenced
this pull request
Oct 16, 2017
Author: Jens Hedegaard Nielsen <jenshnielsen@gmail.com> Smaller changes to parameters (#788)
giulioungaretti
pushed a commit
that referenced
this pull request
Oct 16, 2017
Author: Jens Hedegaard Nielsen <jenshnielsen@gmail.com> Smaller changes to parameters (#788)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes the changes from #774 and changes the set/get to imho be more logical
and resolves issues regarding using val_mapping and parers on parameters without a set/get method (What used to be manual paramters) (see test)