Fix duplication of docs in extend_command
#282
Draft
+10
−2
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.
Originally reported in scipy/scipy#23041 (comment)
extend_command
duplicates doc strings of commands decorated withextend_command
. Whatever commands I have tried in SciPy, all have docs from the originalspin
function and the SciPy function of the command. Take a look at the following examples,spin shell --help
(in SciPy),spin docs --help
(in SciPy)I think the problem is with the following line,
spin/spin/cmds/util.py
Line 175 in fee6abe
If both,
my_cmd.help
anduser_func.__doc__
will be present then both will be combined. In my opinion, better idea would be to give priority touser_func.__doc__
if it is present. Otherwise, fallback tomy_cmd.help
.In this PR, the outputs of the above commands look like as follows,