Fix trailing newlines in operator arguments docs #3841
Merged
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.
Signed-off-by: Kamil Tokarski ktokarski@nvidia.com
Category:
Other (e.g. Documentation, Tests, Configuration)
Description:
Fixes an issue with operators named arguments documentation. If the argument's C++ docstring ends in a new line, the Python code that generates documentation may end up adding too much new lines separating the docstring and auto-generated remarks to the argument, which in effect leads to incorrect parsing of the whole docstring by Sphinx. See the example below:
Supports per-frame inputs
is appended by Python docs generator to bothangle
andaxis
arguments, but the second one has trailing newlines in C++ definition, which leads to incorrectly parsed docs as in the second picture.With the PR:
![fixed](https://user-images.githubusercontent.com/11878086/164778092-276e6c02-6c2e-4d1b-9fdb-852dfddc686a.png)
Without the PR:
![overindented](https://user-images.githubusercontent.com/11878086/164778101-448a5a62-b97f-4a29-a576-dcf399a9d37d.png)
Additional information:
Affected modules and functionalities:
It's a one liner in Python docs generating script.
Key points relevant for the review:
Checklist
Tests
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-2751