-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Conversation
@@ -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 ?? |
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.
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='])) | |||
|
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.
Instead of this, you can run individual tests with nose tests/test_autocomplete.py
Also check out the tests, https://travis-ci.org/bpython/bpython/jobs/79684995 |
Looks great, thanks @wevial. I'll take a closer look today. Hope you're well! |
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. |
Autocomplete shows single underscore attributes before double underscore ones, as per Tom's suggestion.