(🐞) error code that is enabled in the config file can't be disabled on the CLI (with `--disable-error-code`)
オープン
まだ誰も着手していません。
bug
topic-configuration
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
I think it would be intuitive for commandline arguments to override config file options, but the way that enable/disable-error-code works isn't.
pyproject.toml
[tool.mypy]
enable_error_code = "operator"
> mypy --disable-error-code operator -c "1 + ''"
test.py:1: error: Unsupported operand types for + ("int" and "str") [operator]
Found 1 error in 1 file (checked 1 source file)
The docs specify how these flags interact with themselves, but don't mention the ones in the config file.
--enable-error-code
This flag allows enabling one or multiple error codes globally. See [Error codes](https://mypy.readthedocs.io/en/stable/error_codes.html#error-codes) for more information.
Note: This flag will override disabled error codes from the [--disable-error-code](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-disable-error-code) flag.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、mypy が pyproject.toml の enable_error_code と disable_error_code をコマンドラインオプションとどのように組み合わせるかを追跡します。--disable-error-code operator を使って例を再現し、その後、設定と CLI の組み合わせをカバーするテストを追加します。CLI オプションが設定されたエラーコードを抑制し、ドキュメントでこの優先順位が説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100