From c7ad88ef818aa58d1c6fbd2bcb666d43ca4add8c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 25 Nov 2003 21:50:05 +0000 Subject: [PATCH] Don't put the introspected argstr in the docstring if the firstline appears to have one already. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/py/introspect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/wx/py/introspect.py b/wxPython/wx/py/introspect.py index 3bdff3a460..a6df887ea2 100644 --- a/wxPython/wx/py/introspect.py +++ b/wxPython/wx/py/introspect.py @@ -169,6 +169,8 @@ def getCallTip(command='', locals=None): temp = argspec.split(',') if len(temp) == 1: # No other arguments. argspec = '()' + elif temp[0][:2] == '(*': # first param is like *args, not self + pass else: # Drop the first argument. argspec = '(' + ','.join(temp[1:]).lstrip() tip1 = name + argspec @@ -184,7 +186,7 @@ def getCallTip(command='', locals=None): # tip3 is the rest of the docstring, like: # "The call tip information will be based on ... firstline = doc.split('\n')[0].lstrip() - if tip1 == firstline: + if tip1 == firstline or firstline[:len(name)+1] == name+'(': tip1 = '' else: tip1 += '\n\n'