Fix: Napoleon NumpyDocstring incorrect section ordering - #14188
Fix: Napoleon NumpyDocstring incorrect section ordering#14188DavidAGInnovation wants to merge 10 commits into
Conversation
|
The |
8fc1fb2 to
1d2b57d
Compare
|
Fixed the CI / Python 3.12 (Docutils 0.21) failure: it was Git’s working-tree-encoding conversion choking on working-tree-encoding=iso-8859.
|
AA-Turner
left a comment
There was a problem hiding this comment.
please revert all unrelated changes
…x-doc#13180) Implements section reordering in NumpyDocstring._parse to ensure 'Attributes' and 'Methods' sections appear after 'Parameters', matching numpydoc standard logic. This is achieved by collecting sections during parsing then reordering them before generating the final parsed lines.
d07e1c8 to
f97e19f
Compare
|
Done, the tests are running again. |
|
Will this be merged then? @AA-Turner |
|
There's been no review yet which is the major blocker to merging. It'd be helpful to reviewers to have tests and a CHANGES entry in this PR, though. A |
|
Done @AA-Turner |
|
Do you think it's ready to be merged now? @AA-Turner |
|
Thanks for the feedback. I removed the unrelated autosummary changes, restored the numfig marker, and fixed the ty checkout failure by correcting the Latin-1 fixture encoding configuration. Focused tests, ty, and Ruff pass locally. Ready for another review. |
|
Addressed the review feedback on the original PR:
The original PR's focused tests, |
|
Closing until the PR description is updated in accordance with the AI policy, which is intended to ensure appropriate human oversight. I can reopen once the description is updated. |
|
No AI use here. @jdillard |
|
Can you remove the unrelated changes (you've had to be asked 3 times now and you keep reintroducing new ones). Those changes are addressed in #14467 |
|
Thanks for pointing this out, and apologies for reintroducing them. I’ve removed the unrelated .gitattributes and wrongenc.inc changes from this PR; those remain covered by #14467. This PR now contains only the Napoleon section-ordering implementation, regression test, and changelog entry. @jdillard |
Closes #13180. Implements section reordering in
NumpyDocstring._parseto ensure 'Attributes' and 'Methods' appear after 'Parameters', matching numpydoc standard logic.