Feature: Add open close parentheses for attribute suggestions that are methods #840
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.
TLDR:
Sorry for the bad quality gifs. I should stop using GIPHY for this.
Native function completion


Current behavior: open parenthesis in suggestion and autofill. You have to type something after the paren before you can see the method signature.
My proposal: open AND close parens in suggestion, no parens in autofill. Now typing the open paren shows the method signature.
This might mess with some people's muscle memory since it changes what's autofilled.
Attributute completion


Current behavior: no parens in suggestion or autofill. You can't tell what is a method or otherwise.
My proposal: open close parens in suggestion, no parens in autofill. Very clear which attrs are methods.
Since this only changes the infobox, it shouldn't mess with anyone's muscle memory.
If this seems worth implementing, I'll need to fix some tests. Right now, tests expect matches that look like "math.cos" or "any(", but they'll be getting matches that look like "math.cos()" and "any()".
Also I'm not sure if I implemented this the best way. The way I did it, the actual match string is altered to have parens. Maybe it's better to leave the match as-is, but add parenthesis only on the front end. This would require some passing around of information. Feedback appreciated.