python / python/mypy

Add test that prevents increasing import cycles in the mypy implementation

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

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

priority-1-normal topic-developer topic-tests
主要言語
Python
スター
20.6k
フォーク
3.3k
PR マージ指標
PR 指標を取得中

説明

It's easy to accidentally introduce new modules in import cycles, which can make the structure of the codebase worse and slow down incremental builds. Add a test that checks that this does not happen.

See #7397 for context. Here is one idea from that PR:

We could perhaps run another incremental build after self check in verbose mode and assert that the largest import cycle is below some size limit by parsing the verbose output. Alternatively, we could modify verbose mode to write more details about SCCs in incremental mode and make more specific assertions, such as requiring that the nodes, typeops and checker cycles are disjoint.

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

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

はじめの一歩

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

調査の方向性

まず #7397 のコンテキストを読み、インクリメンタルビルド、自己チェック、詳細モードのエントリポイントをたどります。提案されたアサーションのうちどれが実用的かを判断し、その後、import cycle のサイズの増加を検出するか、関連する SCC の制約を検証する回帰テストを追加します。完了とは、サイクルが悪化したときにテストが失敗し、現在の実装では成功することです。

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

評価

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

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

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