python / python/mypy

--python-version 3.9 should warn about generic usages

オープン
#10,971 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

feature
主要言語
Python
スター
20.6k
フォーク
3.3k
PR マージ指標
PR 指標を取得中

説明

Feature

From the Python documentation:

The redundant types are deprecated as of Python 3.9 but no deprecation warnings will be issued by the interpreter. It is expected that type checkers will flag the deprecated types when the checked program targets Python 3.9 or newer.

However that does not seem to be the case with mypy even if it's run with --python-version 3.9.

Pitch

Currently there is no way to learn about these deprecation warnings in automated way, because they're not issued by anything, which makes making the code future-proof a hassle.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず、mypy が --python-version 3.9 のターゲットをどのように扱い、どこでジェネリック型の使用を解析しているかを追跡します。その動作を Python ドキュメントにある非推奨の冗長な型と比較し、対象となる使用に対する診断を追加して、Python 3.9 向けにコードをチェックしたときに警告が表示されることを確認します。

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

評価

技術スタック
python
領域
devtools
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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