Move "Attributes" and "Methods" below "Parameters"#571
Conversation
|
@lucascolley can you look to see if there is some test that could be added or modified that would have caught this? |
|
this test numpydoc/numpydoc/tests/test_docscrape.py Line 1258 in 54dbc89 |
|
I opened gh-572 in case we need higher-level discussion. |
rossbar
left a comment
There was a problem hiding this comment.
FWIW I'm in favor of the change - class attributes and methods are typically key pieces of API, so ensuring that they render near the top of the docstring instead of being buried under the other sections seems like an improvement.
|
could someone approve CI please? :) |
|
Done! |
|
apologies for the iteration, I was being lazy and not running the tests - they all pass locally for me now! |
larsoner
left a comment
There was a problem hiding this comment.
Seems like everyone is in favor so in it goes, thanks @lucascolley !
|
thanks all! |
The numpydoc 1.8.0 release re-ordered some sections [1] in generated docs, which caused our missing reference extension to no longer ignore some entries since they are at different lines. Fixes matplotlib#28715 [1] numpy/numpydoc#571
Reorder the sections in
docscrapeto match the style guide. As per https://numpydoc.readthedocs.io/en/latest/format.html#class-docstring, the Attributes section should be "located below the Parameters section", which I am interpreting as directly below. It seems wrong for Attributes to be below Notes, References and Examples.x-ref scipy/scipy#21099