python / python/mypy

Config file format is inconvenient when you have a lot of untyped dependencies

オープン
#8,918 コメント 4 件 リアクション 3 件 担当者 0 名 GitHub で見る

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

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

説明

  • Are you reporting a bug, or opening a feature request?

Feature request.

  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.

When a project with many dependencies is ported to mypy, it will typically have to tell mypy to ignore the imports of these many dependencies. That means that the mypy.ini config file will look like this

[mypy-numpy]
ignore_missing_imports = True
[mypy-cv2]
ignore_missing_imports = True
[mypy-bson,bson.*]
ignore_missing_imports = True

For big projects, this list will be very long.

  • What is the behavior/output you expect?

It would be nice if you could specify the list as a single option in the mypy config file:

[mypy]
ignore_missing_imports =
    numpy
    cv2
    bson
    ...

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

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

はじめの一歩

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

調査の方向性

issue 内の mypy.ini の例から始め、次に mypy の設定パーサーとモジュール単位のオプションに関するテストを見つけます。ignore_missing_imports セクションの繰り返しと、bson.* のようなドット区切りのパターンが現在どのように扱われているかを確認します。1 つのリスト形式の設定で、指定された各モジュールまたはパターンにそのオプションが適用されれば完了です。

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

評価

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

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

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