Bugfix: interact on decorated method that uses self.#2408
Merged
ntjess merged 2 commits intopyqtgraph:masterfrom Sep 8, 2022
Merged
Bugfix: interact on decorated method that uses self.#2408ntjess merged 2 commits intopyqtgraph:masterfrom
interact on decorated method that uses self.#2408ntjess merged 2 commits intopyqtgraph:masterfrom
Conversation
The new example used to fail before this PR. A result of pyqtgraph#2404 was that `inspect.signature` no longer realized that `self` was a bound variable in class-defined, outside-decorated functions. Fix this simply by calling `functionToParameterDict` on the original function, rather than the interactive version.
c023a8e to
98528d0
Compare
- `runOpts` -> `runOptions` - Don't pollute `RunOptions` namespace with `UNSET` sentinel indicator, since it isn't affiliated with the run button behavior
98528d0 to
74aa920
Compare
Member
|
congratulations @ntjess for your first merge to the repo! ...while you're at it ... (kidding!) Thanks for the PR! |
This file contains hidden or 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
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.
The modified example in
tests/parametertreeused to fail before this PR. A result of #2404 was thatinspect.signatureno longer realized thatselfwas a bound variable in class-defined, outside-decorated functions. Fix this simply by callingfunctionToParameterDicton the original function, rather than the interactive version.Also expands
runOptstorunOptionsto remain in keeping with fully-expanded argument names elsewhere.setOptsand related terms are now the only non-expanded items, since they match the already-presentParameterAPI