python / python/mypy

(🐞) An error should be reported when `reveal_type` is used but not called

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

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

feature priority-2-low topic-reveal-type
主要言語
Python
スター
20.6k
フォーク
3.3k
平均マージ
1日 18時間
マージ済み PR(30日)
54

説明

reveal_type
not_defined
main.py:2:1: error: Name "not_defined" is not defined  [name-defined]
Found 1 error in 1 file (checked 1 source file)
Issue:

When reveal_type is called (reveal_type(1)) mypy reports a note and exits with status 1, but when reveal_type is used as a value without being called mypy doesn't report any error or note.

reveal_type

actual:

Success: no issues found in 1 source file

expected:

main.py:1:1: error: reveal_type must be called [misc]
Found 1 error in 1 file (checked 1 source file)

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

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

はじめの一歩

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

調査の方向性

まず main.pyreveal_type の例を再現し、単独の reveal_type 式と比較して、mypy が reveal_type(1) をどのように処理するかを追跡します。単独での使用が reveal_type must be called [misc] を報告し、既存の呼び出し形式が引き続きそのノートを報告すれば完了です。

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

評価

技術スタック
python
領域
compilers
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

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

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