Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move "Attributes" and "Methods" below "Parameters"#571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
larsoner merged 5 commits intonumpy:mainfromlucascolley:class-section-order
Jul 12, 2024

Conversation

lucascolley
Copy link
Contributor

@lucascolleylucascolley commentedJul 8, 2024
edited
Loading

Reorder the sections indocscrape to match the style guide. As perhttps://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-refscipy/scipy#21099

melissawm and agriyakhetarpal reacted with heart emoji
@larsoner
Copy link
Collaborator

@lucascolley can you look to see if there is some test that could be added or modified that would have caught this?

@lucascolley
Copy link
ContributorAuthor

this test

deftest_class_members_doc_sphinx():
actually expects Examples to be above Attributes and Methods. So maybe the question of where they should go isn't settled. I think that we should either change the order in the code/tests (my preference - I don't see why See Also should be above Attributes, for example), or change the wording in the style guide.

@lucascolley
Copy link
ContributorAuthor

I openedgh-572 in case we need higher-level discussion.

Copy link
Contributor

@rossbarrossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

lucascolley reacted with thumbs up emoji
@lucascolley
Copy link
ContributorAuthor

could someone approve CI please? :)

melissawm reacted with thumbs up emoji

@larsoner
Copy link
Collaborator

Done!

@lucascolley
Copy link
ContributorAuthor

apologies for the iteration, I was being lazy and not running the tests - they all pass locally for me now!

Copy link
Collaborator

@larsonerlarsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Seems like everyone is in favor so in it goes, thanks@lucascolley !

lucascolley reacted with heart emoji
@larsonerlarsoner merged commit7716617 intonumpy:mainJul 12, 2024
23 checks passed
@stefanvstefanv added this to the1.8.0 milestoneJul 12, 2024
@lucascolley
Copy link
ContributorAuthor

thanks all!

@lucascolleylucascolley deleted the class-section-order branchJuly 12, 2024 14:55
QuLogic added a commit to QuLogic/matplotlib that referenced this pull requestAug 13, 2024
The numpydoc 1.8.0 release re-ordered some sections [1] in generateddocs, which caused our missing reference extension to no longer ignoresome entries since they are at different lines.Fixesmatplotlib#28715[1]numpy/numpydoc#571
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@larsonerlarsonerlarsoner approved these changes

@rossbarrossbarAwaiting requested review from rossbar

Assignees
No one assigned
Projects
None yet
Milestone
1.8.0
Development

Successfully merging this pull request may close these issues.

5 participants
@lucascolley@larsoner@rossbar@stefanv@melissawm

[8]ページ先頭

©2009-2025 Movatter.jp