[Pydev-cvs] org.python.pydev/PySrc importsTipper.py,1.18,1.19
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-07-13 23:46:06
|
Update of /cvsroot/pydev/org.python.pydev/PySrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14883/PySrc Modified Files: importsTipper.py Log Message: changes for code-completion for builtins Index: importsTipper.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/importsTipper.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** importsTipper.py 2 Jul 2006 01:31:02 -0000 1.18 --- importsTipper.py 13 Jul 2006 23:46:03 -0000 1.19 *************** *** 133,137 **** ! def GenerateImportsTipForModule( mod ): --- 133,140 ---- ! def CheckChar(c): ! if c == '-' or c == '.': ! return '_' ! return c def GenerateImportsTipForModule( mod ): *************** *** 205,208 **** --- 208,213 ---- s = doc[0:i] s = s.strip() + + #let's see if we have a docstring in the first line if s[-1] == ')': start = s.find('(') *************** *** 215,218 **** --- 220,236 ---- if not args[-1] == ')': args += ')' + + + #now, get rid of unwanted chars + l = len(args)-1 + r = [] + for i in range(len(args)): + if i == 0 or i == l: + r.append(args[i]) + else: + r.append(CheckChar(args[i])) + + args = ''.join(r) + except: pass |