Skip to content

Show single underscore attributes before double underscore ones #528 #561

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

Closed
wants to merge 7 commits into from

Conversation

wevial
Copy link
Contributor

@wevial wevial commented Sep 10, 2015

Autocomplete shows single underscore attributes before double underscore ones, as per Tom's suggestion.

@@ -256,6 +256,7 @@ def matches(self, cursor_offset, line, **kwargs):
if not r.word.split('.')[-1].startswith('_'):
matches = set(match for match in matches
if not match.split('.')[-1].startswith('_'))
# MAYBE HERE 2 ??
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a few comments made it in by accident

@@ -365,3 +367,6 @@ def func(apple, apricot, banana, carrot):
set(['banana=']))
self.assertSetEqual(com.matches(3, "car", argspec=argspec),
set(['carrot=']))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, you can run individual tests with nose tests/test_autocomplete.py

@thomasballinger
Copy link
Member

Also check out the tests, https://travis-ci.org/bpython/bpython/jobs/79684995

@thomasballinger
Copy link
Member

Looks great, thanks @wevial. I'll take a closer look today. Hope you're well!

@thomasballinger
Copy link
Member

Ah I see - this is absolutely my fault, but because I didn't review this in time #568 was merged instead. That PR doesn't quite do what I requested in issue #528, it doesn't even show double underscore methods until the user adds the second underscore. But it does the basic idea, and it's maybe a better idea.

@wevial this is great but looks like we don't need it. Thanks for submitting and doing the changes I asked for, sorry I didn't review it in time because I absolutely would have accepted it.

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.

2 participants