Warnings in docstring for constants

Aperta
#478 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Riproduci gli avvisi GL01 e GL02 con gli esempi di docstring delle costanti usando numpydoc v1.5.0. Confronta il comportamento dei riepiloghi multilinea e su una sola riga con quanto previsto da PEP257, quindi definisci il comportamento di validazione predefinito previsto e verifica entrambi gli esempi rispetto a esso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have a couple warnings that I don't understand, also because I am doing already what the validator says...

SOME_CONSTANT = 1
"""
summary line.

some explanation.
"""

I get

GL01: Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)
  GL02: Closing quotes should be placed in the line after the last text in the docstring (do not close the quotes in the same line as the text, or leave a blank line between the last text and the quotes)

the same thing also in the case of a single summary line (for which I would argue that these 2 warnings should be disabled by default as per PEP257), doesn't matter if the quotes are on the same line or not.

I am using numpydoc v1.5.0.

Lingua principale
Python
Stelle
354
Fork
185
Merge medio
4m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di numpy/numpydoc

Tutte le issue di numpy/numpydoc

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.