`var-annotated` errors for iteration should point to the line where the variable is defined
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #22266 @freddyuniverse による — マージされずにクローズ
評価
調査の方向性
Start by tracing how mypy reports var-annotated errors for the comprehension example in the issue, comparing native and non-native parser behavior. The payload names no source files or tests, so locate the relevant error reporting and parser tests first. Done means the error points to the line where the iteration variable is defined in both parser modes.
索引モデルが issue の本文から書いたものです。
説明
Bug Report
See title
To Reproduce
from typing import Never
x: Never
sum( # non-native parser errors here
y # native parser errors here
for y in x # expected error here
)
Expected Behavior
Expected an error at # expected error here.
Actual Behavior
Got an error at either # non-native parser errors here or # native parser errors here based on the parser.
Your Environment
Reproduced in mypy-play.
- Mypy version used: 2.4.0
- Mypy command-line flags: N/A
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.12
- 主要言語
- Python
- スター
- 20.7k
- フォーク
- 3.3k
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 123
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/mypy のほかの issue
-
Regression in 2.4.0: empty constraint tuple in PEP 695 type parameter (`class C[T: ()]`) is no longer reported再び着手できるかも @CheerathAniketh が 15 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンtopic-parser topic-pep-695
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python/mypy#22176 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
matches_gitignore: directory-only patterns in nested .gitignore not excluded under --exclude-gitignore対応中かも @pavithraramesh5500-ship-cse が 6 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
`stubgen --inspect-mode` crashes with `AttributeError on PEP 604 union syntax (X | Y)` *(mypy 2.1.0)*対応中かも @ayushdoesdev が 82 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Inconsistent description of `strict_optional`対応中かも @Joosboy が 98 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python/mypy#21658 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Cannot set `output` in `mypy.ini`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug topic-configuration topic-error-reporting
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python/mypy#21376 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-free対応中かも @Aaqibhafeezkhan が今日担当しました。 オープンbeginner documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BistaDinesh03/critique#164 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug IO
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MrNeRF/LichtFeld-Studio#3824 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-webui/open-webui#33200 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog check対応中かも @ocelotl が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
open-telemetry/opentelemetry-python#5825 ·
メンテナーはふだん 2 日以内に返信