[pyzo] 22/68: fix calltips

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Sep 28 09:47:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository pyzo.

commit 0dc136d931d3ba8dc3df9572b5b953cffa5c3fa2
Author: Almar Klein <almar.klein at gmail.com>
Date:   Fri Aug 19 10:06:05 2016 +0200

    fix calltips
---
 pyzo/core/baseTextCtrl.py        | 9 ++++-----
 pyzo/pyzokernel/introspection.py | 2 ++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/pyzo/core/baseTextCtrl.py b/pyzo/core/baseTextCtrl.py
index e3e34e4..d80eef2 100644
--- a/pyzo/core/baseTextCtrl.py
+++ b/pyzo/core/baseTextCtrl.py
@@ -116,11 +116,12 @@ def parseLine_signature(tokens):
     - location of end bracket
     - amount of kommas till cursor (taking nested brackets into account)
     """
+    
     openBraces = [] #Positions at which braces are opened
     for token in tokens:
-        if not isinstance(token,Tokens.NonIdentifierToken):
+        if not isinstance(token, (Tokens.NonIdentifierToken, Tokens.OpenParenToken)):
             continue
-        for i,c in enumerate(str(token)):
+        for i, c in enumerate(str(token)):
             if c=='(':
                 openBraces.append(token.start + i)
             elif c==')':
@@ -136,10 +137,8 @@ def parseLine_signature(tokens):
             tokens[-1].end = i
         
         name, needle = parseLine_autocomplete(tokens)
-
         return name, needle, (i,0) #TODO: implement stats
-        
-        
+    
     return "","",(0,0)
 
 
diff --git a/pyzo/pyzokernel/introspection.py b/pyzo/pyzokernel/introspection.py
index d881ca8..9f19f61 100644
--- a/pyzo/pyzokernel/introspection.py
+++ b/pyzo/pyzokernel/introspection.py
@@ -166,6 +166,8 @@ class PyzoIntrospector(yoton.RepChannel):
                 funname = objectName.split('.')[-1]
                 sigs = "%s(%s)" % ( funname, ", ".join(args2) )
         
+        elif sigs:
+            kind = "function"
         else:
             sigs = ""
             kind = ""

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyzo.git



More information about the debian-science-commits mailing list