Calculate positive relative end index for last section in NumpydocTools #60
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.
To fix the issue one had to calculate the correct, positive relative end index in
NumpydocTools.get_list_key
instead of using -1 as end index.But because there are more issues with already existing numpydoc which gets "converted" to numpydoc I left the test
tests/pyment_test_cases.FilesConversionTests.testCaseNoGenDocsAlreadyNumpydoc
untouched and I also did not modify thetests/docs_already_numpydoc.py
file as this would also obfuscate the current issue with using "Raises" as last section.However I added a dedicated Python file named
tests/issue_49.py
and showed my fix working by adding the corresponding unit test intests/test_issues.py