-
Notifications
You must be signed in to change notification settings - Fork 110
Salvage parts of #5695 #6440
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
Salvage parts of #5695 #6440
Conversation
When run() was first added, it used to take the exit code from the CommandError raised by a failed command and create a fresh CommandError with the exit code. That hasn't been the case since 3817fb4 (ENH: LEt `run` spit out the original full-detail error, 2018-04-25).
eval_results() combines the positional and keyword arguments of a command's __call__() into an OrderedDict. This has been passed to result filters since 141a55f (RF: Make positionals also available as kwargs to result_filter, 2017-04-24) and to custom result renderers since 6267129 (BF: Result renderers never got to see all args of a command call, 2019-12-23). Whether the dictionary of arguments contains eval_params parameters depends on how the command is called. From the command line, return_type, result_renderer, and result_xfm are always set by Interface.call_from_parser(), while on_failure is set if --on-failure is given and result_filter if --report-status is. From the Python API, the dictionary includes only eval_params parameters that are explicitly specified. To renderers and filters, the above distinctions should not matter. Pass them a dictionary that always includes the effective values of the eval_params parameters so that they can reliably act on these parameters.
Code Climate has analyzed commit fa4b34d and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #6440 +/- ##
==========================================
+ Coverage 89.87% 89.97% +0.10%
==========================================
Files 348 348
Lines 43764 43859 +95
==========================================
+ Hits 39331 39464 +133
+ Misses 4433 4395 -38
Continue to review full report at Codecov.
|
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.
Looks straightforward to me indeed
Thx! |
This PR salvages all commits from #5695 that are still relevant, except for a5d554b which is presently being debated in #6438 (as one of two options).
Changelog
🏠 Internal