Reconsider position of Attributes and Methods sections
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
Inizia dalla logica dell’ordine delle sezioni in numpydoc/docscrape.py alle righe collegate. Esamina in che modo l’ordine attuale gestisce le classi rispetto alle funzioni e risolvi la discussione di progettazione aperta prima di modificarlo. Il lavoro è completato quando viene concordato un ordine che mantenga raggruppati in modo appropriato i parametri delle classi senza alterare i layout esistenti di funzioni e metodi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
#571 changed the section order to move Attributes and Methods right behind Parameters.
The order is now https://github.com/numpy/numpydoc/blob/532cd7d71ceee4e00fd13fa5faf038f2b4d95905/numpydoc/docscrape.py#L118-L137
For classes, we can get the order Paramters > Attributes > Methods > Other Parameters , which IMHO is not quite usable as the Other Parameters are very far away from Parameters.
We have to consider that the ordering should work both for classes and methods. As far as I understand, the motivation for Other Parameters is to deemphasise them and for methods to have the (typically short) sections Returns/Yields/Receives closer to the top.
I propose to move Attributes and Methods below Other Parameters, i.e.
Parameters
Returns
Yields
Receives
Other Parameters
Attributes
Methods
- There's no change for functions / methods as the don't use Attributes and Methods
- There's no change for classes without "Other Parameters" because they don't use Returns/Yields/Receives
- For classes with "Other Parameters" the sequence is "Parameters > Other Parameters > Attributes > Methods", which I think is better because the first two are input values to the construtor, while the other two are properties of the class.
One could argue that one should alternatively not use "Other Parameters" if one wants to render them next to each other anyway. But I claim it's still helpful to de-emphasize additional parameters through that extra section.
- Lingua principale
- Python
- Stelle
- 354
- Fork
- 185
- Merge medio
- 4m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di numpy/numpydoc
-
Don't require ``RT01`` for propertiesForse di nuovo libera @Nani-2007-code l’ha presa 30 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
-
DOC: Version link overflowing on navbarForse di nuovo libera @swoyer2 l’ha presa 52 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
needs-decision
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di numpy/numpydoc
Issue simili
-
00 - Bug component: numpy.linalg
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
521xueweihan/HelloGitHub#4543 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
emeryberger/CSrankings#15700 ·
I maintainer di solito rispondono entro 2 giorni
-
Bug | 工作不正常 Triage | 待检查
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
I maintainer di solito rispondono entro 1 giorno
-
Task select patterns with uppercase letters never matchForse già presa @manobhisriram l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno