python / python/mypy

Semi-verbose flag that shows which files mypy analyzes

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

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

needs discussion topic-developer topic-usability
主要言語
Python
スター
20.6k
フォーク
3.3k
PR マージ指標
PR 指標を取得中

説明

Sometimes (example: #6385) it's useful to be able to see exactly which files mypy is processing. Currently the only way is to use -v and grep stderr for the word "Parsing".

Maybe this is common enough that we could spare a new command-line flag? It would print all the files for which a BuildSource object is created, and all the files that are reached by following imports (with some indicator of which is which).

The order in which files are printed should reflect the order in which they are processed (not the order in which they are specified).

I wouldn't mind adding extra info for each file (e.g. whether its cache entry is used), as long as it remains a single line per file.

Presumably there's also value in printing certain failures, e.g. modules which can't be found but for which no error message is printed (e.g. through --follow-imports=silent). But I would stop here.

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

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

はじめの一歩

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

調査の方向性

まず、stderr に "Parsing" を報告する既存の -v 出力をたどり、次に BuildSource オブジェクトが作成される場所と import が追跡される場所を調べます。新しいコマンドライン・フラグが、直接指定されたファイルまたは import されたファイルごとに、処理順に 1 行を出力し、両者を区別するインジケーターを付けるようになれば完了です。代表的な mypy の実行で出力を検証します。

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

評価

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

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

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