Validating Enum doc-strings?

オープン
#458 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
documentation

調査の方向性

b_asic.quantization.Quantization.ROUNDING の numpydoc 検証警告から始め、表示されている Enum メンバーの docstring と検証ルールを比較します。Enum メンバーの docstring がサポートされているか、また警告が想定されたものかを確認します。サポートされる形式または必要な検証動作が明確に確立されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
354
フォーク
185
平均マージ
4分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

numpy/numpydoc のほかの issue

numpy/numpydoc の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。