python / python/cpython

Make REPL completions match only syntactically valid keywords and values

Open
#122,379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib topic-repl type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:
image image

The completion in the above case shows [ not unique ] and gives several suggestions. However, case is the only word to form a valid syntax at this point. It is better to just complete it with case .

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs
  • gh-122380

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CPython REPL completion behavior described in the report, reproducing the case example on the main branch. Completion should offer only syntactically valid keywords or values, completing case directly instead of showing ambiguous suggestions; review linked PR gh-122380 before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.