Validating Enum doc-strings?

Aperta
#458 1 commento 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

Inizia dagli avvisi di validazione di numpydoc per b_asic.quantization.Quantization.ROUNDING e confronta la docstring mostrata del membro di Enum con le regole di validazione. Verifica se le docstring dei membri di Enum sono supportate e se l’avviso è previsto; il lavoro è completato quando il formato supportato o il comportamento di validazione richiesto sono chiaramente stabiliti.

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

Descrizione

Not sure if it is just me, but I get the following warning when validating an Enum:

WARNING: [numpydoc] Validation warnings while processing docstring for 'b_asic.quantization.Quantization.ROUNDING':
  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 code looks like:

class Quantization(Enum):
    """Quantization types."""

    ROUNDING = 1
    """
    Standard two's complement rounding, i.e, tie rounds towards infinity.
    """

Is there a more correct way to document enums or is this just something that is not completely covered in the validation?

Edit: I should mention that I have tried several different ways to format the doc-string as well.

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.