IDLE doesn't know where to start parsing
オープン
まだ誰も着手していません。
topic-IDLE
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
After making a typo in IDLE, I noticed some unexpected calltips and incorrectly matched parentheses. These seem to be caused by the parser not knowing where the current prompt begins. I'll try to send in a PR tonight.
Examples
Parentheses are incorrectly matched:
>>> (1 2
...
SyntaxError: '(' was never closed
>>> ) # IDLE highlights this as the closing paren
Matching parentheses aren't detected (from #85560):
>>> (1 if 0
else 0) # IDLE beeps here, not detecting the opening paren
Calltip appears unexpectedly (Python 3.12; a new error message hides this issue in the latest version):
>>> (1 2
...
SyntaxError: incomplete input
>>> ( # this opens the calltip for `input`
CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
macOS
Linked PRs
- gh-124554
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、記載されている Python バージョンで、issue にある括弧の対応付けと calltip の例を使って IDLE の解析動作を再現します。IDLE が現在のプロンプト境界をどのように決定しているかを追跡し、そのうえで、それらの例に対して括弧の対応付けと calltip が正しく動作することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- desktop, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100