Open m-schmoock opened 1 day ago
@cdecker Another option would be to reintroduce the description
as a separate decorator to the method but do the same internal handling (appending to usage and passing to manifest json). Maybe that looks nicer in plugin code
We had to fix it quickly for the release, BUT the correct answer is to use the docstring! We already introspect, so accessing doc is easy (which always exists, but is None for no doc string).
We had to fix it quickly for the release, BUT the correct answer is to use the docstring! We already introspect, so accessing doc is easy (which always exists, but is None for no doc string).
Thanks for the clarification. I have been away from the project for a while as you know ;)
I rewrote the PR to use python docstring doc (if set) as the description.
We may want to extend the JSON schema to have the description as a separate field (and not internally newline concatenated to the usage). What do you think?
The extended usage information (long_description) has been removed a while ago without proper replacement. ( commit 2ff3e55f0 Date: Mon Jul 29 17:58:43 2024 -0700 )
This PR does the following:
description
parameter to a plugin method via docstring that will (if set) be appended with a newline following the generated usage argument list.adds a testcase that checks if extended usage information is passed to manifest json and
print_usage
Things to think about