Tab completion not working in same cell

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
jupyter, python

調査の方向性

まず、ipykernel.tests.utils を使って Python の再現コードを実行し、kc.complete と返される 2 つの matches の値に注目します。改行を含むセルに対するカーネル補完の処理を追跡し、単一行の場合と比較します。2 つ目のセルの末尾で補完が機能し、回帰がテストでカバーされれば完了です。

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

説明

I create two cells, run both

2019-11-15-100127

Then I try tab completion

2019-11-15-100114

If I press tab at the end of the second cell, nothing happens. If I press tab at the end of the third cells, it works.

Python repro:

from ipykernel.tests.utils import new_kernel, wait_for_idle, execute, TIMEOUT

cells = [
    'import datetime',
    't = datetime.date.today()',
    't = datetime.date.today()\nt.',
    't.'
]

with new_kernel() as kc:
    execute(cells[0], kc=kc)
    wait_for_idle(kc)
    execute(cells[1], kc=kc)
    wait_for_idle(kc)
    kc.complete(cells[2])
    matches_1 = kc.get_shell_msg(block=True, timeout=TIMEOUT)['content']['matches']
    kc.complete(cells[3])
    matches_2 = kc.get_shell_msg(block=True, timeout=TIMEOUT)['content']['matches']
主要言語
Python
スター
734
フォーク
411
平均マージ
1日 2時間
マージ済み PR(30日)
9

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

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

はじめの一歩

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

ipython/ipykernel のほかの issue

ipython/ipykernel の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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