RF: call_from_parser - move code into "else" to simplify reading etc#6982
Merged
Conversation
If I read logic right, there should be no effect from this change whatsoever. But in such formulation we avoid unnecessary assignment (value would be reassigned) for the cases whenever the condition below it succeeds. So I decided to make that code logic a bit more "kosher"
Codecov Report
@@ Coverage Diff @@
## maint #6982 +/- ##
==========================================
+ Coverage 90.13% 91.12% +0.98%
==========================================
Files 354 354
Lines 46326 46321 -5
Branches 6613 6612 -1
==========================================
+ Hits 41755 42209 +454
+ Misses 4554 4096 -458
+ Partials 17 16 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
yarikoptic
commented
Aug 29, 2022
| if args.common_result_renderer != 'tailored' \ | ||
| else getattr(cls, 'result_renderer', 'generic') | ||
| if '{' in args.common_result_renderer: | ||
| from .renderer import DefaultOutputRenderer |
Member
Author
There was a problem hiding this comment.
surprise (unrelated to this PR) -- this code block is reported to be untested!
yarikoptic
commented
Aug 29, 2022
| if args.common_result_renderer != 'tailored' \ | ||
| else getattr(cls, 'result_renderer', 'generic') | ||
| if args.common_on_failure: | ||
| kwargs['on_failure'] = args.common_on_failure |
Member
Author
There was a problem hiding this comment.
another "core" code block without test! eh.
Contributor
|
🚀 PR was released in |
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.
If I read logic right, there should be no effect from this change whatsoever. But
in such formulation we avoid unnecessary assignment (value would be reassigned) for
the cases whenever the condition below it succeeds. So I decided to make that code
logic a bit more "kosher"