| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Exciting! Just some nits.
Sorry, something went wrong.
|
Assuming the tests are going to pass (last famous words), this is ready to review.
Compared to the initial version, I'm now using _colorize.get_theme() to get the colors. /cc @ambv as I think he's the one responsible for themes. |
Sorry, something went wrong.
|
Also, I'm getting a warning from the doc builder but I'm not sure how to fix: Warning: py:mod reference target not found: _pyrepl.fancycompleter [ref.mod] /home/runner/work/cpython/cpython/Doc/using/cmdline.rst:1288: WARNING: py:mod reference target not found: _pyrepl.fancycompleter [ref.mod] _pyrepl.fancycompleter is a module, do I need to add it somewhere else? |
Sorry, something went wrong.
Yes, but it is not documented. You can add an exclamation mark at the start to remove the link. |
Sorry, something went wrong.
Sorry, something went wrong.
…y this fixes the failures on Android CI
…d color. This is both more robust and more correct
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
…vance, let's add a comment to explain why
Keep pyrepl completion logic working on the uncolored completion text. The reader now strips ANSI escapes before comparing the typed stem, inserting a sole completion, computing the shared prefix, and filtering an open completion menu. This fixes colored completions that would stop refining correctly once more characters were typed. Restore readline's callable postfix behavior for attribute completions by routing single attribute matches through rlcompleter's callable postfix logic while keeping the full expr.attr stem for menu refinement. Global completion also treats soft keywords as keywords instead of trying to evaluate them. Avoid side effects while probing attribute values for coloring by not forcing property access and by preserving lazy module imports. Also make the fake color-sorting escape prefix round-trip cleanly once the match index grows past three digits. Only honor PYTHON_BASIC_COMPLETER when the environment is enabled, so pyrepl setup now respects -E / sys.flags.ignore_environment. Add regression tests for the reader behavior, callable attribute completion, property and lazy-import safety, large color-sort prefixes, and the -E setup path.
|
Thanks for the great work on this, @antocuni . I rebased the branch and added a handful of follow-up fixes around the fancycompleter integration, including some edge cases and extra regression coverage. This is in good shape now, and I’m planning to land it soon so it makes the next release. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM after my fixes
Sorry, something went wrong.
|
I think this has some issues...: Screencast.From.2026-04-06.10-41-01.mp4 |
Sorry, something went wrong.
| # Encode the match index into a fake escape sequence that | ||
| # stripcolor() can still remove once i reaches four digits. | ||
| N = f"\x1b[{i // 100:03d};{i % 100:02d}m" |
Sorry, something went wrong.
There was a problem hiding this comment.
Let's open an issue and fix this in a separate PR
Sorry, something went wrong.
…olored tab completions (python#130473) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
| Back | FazBrowse Home | New Git URL |
As the title says, this is (WIP) to integrate fancycompleter into the new REPL.