Check GL08 on class __init__ constructors

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
documentation

調査の方向性

まず、GL08 チェックと、既存の override_ および exclude TOML 設定の処理を追跡します。クラスに docstring がある場合に、ドキュメント化されていない init と、明示的な docstring を持つ init をどのように区別するかを確認します。デフォルトの動作が前者のみをスキップし、ドキュメント化されたコンストラクターは引き続きチェックし、その動作がテストでカバーされていれば完了です。

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

説明

I was looking for a way to skip GL08 checks on class constructors (__init__) throughout my code. This is particularly as the numpydoc recommendation for class strings documents the constructor:

Class docstring
Use the same sections as outlined above (all except Returns are applicable). The constructor (__init__) should also be documented here, the Parameters section of the docstring details the constructor’s parameters.

It seems that there ought to be a default check ignore for __init__ constructors if no docstring has been provided (and if a class docstring has been provided). Obviously if an (optional) docstring for __init__ has been created, then it ought to be checked.

This conditional checking doesn't seem possible with the default override_<code>, exclude toml tags.
Keen to hear others thoughts!

主要言語
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 を短くまとめたダイジェスト。