-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-130472: Integrate fancycompleter with the new repl, to get colored tab completions #130473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
antocuni
wants to merge
51
commits into
python:main
Choose a base branch
from
antocuni:antocuni/fancycompleter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+396
−1
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
4eb226b
import fancycompleter from https://github.com/pdbpp/fancycompleter/co…
antocuni c5dfc85
add copyright notice
antocuni b561a2e
enable FancyCompleter by default, unless you set PYTHON_BASIC_COMPLETER
antocuni 5f56673
WIP: kill a lot of code which is no longer necessary
antocuni 40563f2
force colors for now
antocuni 88181da
kill the logic to find a readline, we can always use _pyrepl.readline…
antocuni 77c578a
kill LazyVersion
antocuni 9069419
we surely don't need to support python 2.7 now :)
antocuni bdbe022
kill ConfigurableClass
antocuni 0ea7c49
better name
antocuni 6ddfa61
use _colorize instead of our own Color
antocuni 30abd71
WIP: copy&adapt some tests from the original fancycompleter. They don…
antocuni 983824a
edited by copilot: move from pytest-style to unittest-style
antocuni acbafe4
don't try to be too clever with exceptions: if a global name raises a…
antocuni 5546b94
no longer needed
antocuni 327648f
this doesn't test anything meaningful
antocuni 44549b9
fix this test
antocuni c9c97f7
fix this test
antocuni c61bab6
Fix this test
antocuni 1de48b6
Apply hugovk suggestions from code review
antocuni 157f4b4
Apply suggestions from code review
antocuni 722ec8a
Apply suggestions from code review
antocuni 4554a9d
Merge branch 'main' into antocuni/fancycompleter
antocuni e2294ec
remove unneeded lazy import
antocuni 4532850
Update Lib/_pyrepl/fancycompleter.py
antocuni 1c3dd97
Merge branch 'antocuni/fancycompleter' of github.com:antocuni/cpython…
antocuni 7089323
move import to module scope
antocuni 926c1a3
move import
antocuni b6385e9
Merge branch 'main' into antocuni/fancycompleter
antocuni 46db5d7
kill this for now, we can redintroduce it later if/when we enable fan…
antocuni c3ea737
this link is dead, add a comment to explain what it does instead
antocuni 433ae06
fix precommit
antocuni 38e8a08
we need to make this import lazy, else we get circular imports
antocuni 4c3ad9c
now that we have themes, we can kill the config object
antocuni 053da64
style
antocuni 2ee47bc
📜🤖 Added by blurb_it.
blurb-it[bot] c3c663e
fix mypy
antocuni b710bce
document PYTHON_BASIC_COMPLETER
antocuni 13a2698
try to manually fix the filename
antocuni 72f30d9
Typo
antocuni b1f86ae
reword
antocuni af1d74e
force PYTHON_COLORS=1 for tests which expects to see colors. Hopefull…
antocuni c52fd7a
fix it in a different way: just look in the theme to find the expecte…
antocuni fdca77e
fix precommit
antocuni 7f9d09c
Update Lib/_pyrepl/fancycompleter.py
antocuni 3a6bcd3
put _colorize.FancyCompleter in alphabetical order w.r.t. the other s…
antocuni 743e661
get_theme() is relatively expensive, fetch it early and cache it
antocuni 2ebf50e
base is never used when calling commonprefix, remove it
antocuni bdf54ed
Update Lib/_pyrepl/fancycompleter.py
antocuni 6a5bcfe
there is no need to sort words in advance, we can just sort names later
antocuni 7d2c790
undo 6a5bcfe9ed: there IS actually a good reason to sort the words in…
antocuni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not sort the
values
. Maybe revert the commit that introduced this if it is too much trouble to fix this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, pro tip for my future self: don't write code when you are sleepy :).
commit 7d2c790 reverts it, and also adds a comment to explain WHY we need to sort words.