Don't complete code ending with `()`
@@ -10,6 +10,15 @@ def suggestForCode(code, path):
def visibleEditor():
return EditorSplitViewController.visible.editor
+ if code[:-1].endswith("()"):
+ if visibleEditor() == None:
+ return
+
+ visibleEditor().completions = []
+ visibleEditor().suggestions = []
+ visibleEditor().docStrings = None
+ return
+
try:
script = jedi.Script(code, len(code.splitlines()), len(code.splitlines()[-1])-1, path)
@@ -43,7 +52,7 @@ def suggestForCode(code, path):
visibleEditor().docStrings = docs
except Exception as e:
- sys.__stdout__.write(str(e)+"\n")
+ sys.__stdout__.write("Code completion: "+str(e)+"\n")
if visibleEditor() == None:
return
