`abc.ABC.__slots__` should be marked with `ClassVar`
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 5.1k
- フォーク
- 2.1k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 82
説明
According to the python official documentation, slots are class variables. Therefore, in the class abc.ABC, the variable __slots__ should be annotated as ClassVar[Sequence[str]]. There is currently no annotation. It means that in all subclasses of abc.ABC, the variable __slots__ is considered as an instance variable.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、abc.ABC を定義している typeshed のスタブを見つけ、slots が現在どのように宣言されているかを確認します。これを ClassVar[Sequence[str]] としてマークし、その後、リポジトリの関連する型チェックテストを使って、サブクラスが slots をインスタンス変数として扱わなくなっていることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100