Generic MRO
オープン
まだ誰も着手していません。
topic: feature
- 主要言語
- Python
- スター
- 1.8k
- フォーク
- 302
- 平均マージ
- 23時間
- マージ済み PR(30日)
- 8
説明
Generic information are lost with classes __mro__. But it could be useful to have it, especially for #776 implementation.
typing module could integrate a generic_mro function in order to retrieve the class MRO annotated with related generic information; this function could also accept a generic alias in argument.
from typing import Generic, TypeVar, generic_mro
T = TypeVar("T")
class A(Generic[T]): ...
U = TypeVar("U")
class B(A[U]): ...
class C(B[int]):
pass
assert generic_mro(C) == (C, B[int], A[int], Generic, object)
assert generic_mro(B) == (B, A[U], Generic, object)
assert generic_mro(B[int]) == (B[int], A[int], Generic, object)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提案されている generic_mro API と関連する issue #776 を読みます。issue には実装ファイルもテストも記載されていません。完了条件は、提案された関数を提供し、C、B、B[int] に対して文書化された3つの MRO 結果と一致させることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100