Implement an analog of map_instance_to_supertype() for protocol supertypes
オープン
まだ誰も着手していません。
refactoring
topic-protocols
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
In certain situation (like e.g. when dealing with *args) we want to know what are the type arguments of a generic protocol that a given type implements. Currently this is done in ad-hoc way in few places, but it would be great to have a dedicated helper.
This will also help with some advanced issues like https://github.com/python/mypy/issues/3829
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、map_instance_to_supertype() と、ジェネリックプロトコルに対する既存のアドホックな処理、特に *args が関わる経路を見つけます。issue #3829 の関連する議論を読み、現在プロトコルの型引数がどのように推論されているかを追跡します。専用のヘルパーによってプロトコルのスーパータイプに対する同等のマッピングが提供され、関連するアドホックなケースでそれを使用できるようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100