Skip to content

Improve autocompletion of parameters #996

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

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Conversation

gpotter2
Copy link
Contributor

@gpotter2 gpotter2 commented Jul 22, 2023

Two minor improvements to the completion:

  1. auto-completion for parameters is done without needing to pass the beggining of a parameter. To give an example:
class Test:
    def __init__(self, aaa, aab, aac):
        pass

with the PR: this allows to do: Test( then TAB directly to select the arguments
image

upstream/main: you need to do Test(a before completion kicks in. Test( gives nothing
image

  1. auto-completion results are ordered slightly differently: parameters should be prioritized when available.

this PR:
image

upstream/main:
image

@gpotter2 gpotter2 changed the title Improve autocompletion Improve autocompletion of parameters Jul 22, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2023

Codecov Report

Merging #996 (77bed91) into main (7bf93f5) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
+ Coverage   76.35%   76.39%   +0.03%     
==========================================
  Files          61       61              
  Lines        8291     8302      +11     
==========================================
+ Hits         6331     6342      +11     
  Misses       1960     1960              
Files Changed Coverage Δ
bpython/autocomplete.py 87.41% <100.00%> (+0.20%) ⬆️
bpython/test/test_autocomplete.py 94.98% <100.00%> (+0.11%) ⬆️

@sebastinas sebastinas merged commit 9c83806 into bpython:main Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants