mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350)
The marker was added to the language in 3.8 and
3.7 only gets security patches.
(cherry picked from commit 40a0625792
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
4ee30c4244
commit
6b731c4878
4 changed files with 8 additions and 9 deletions
|
@ -118,7 +118,6 @@ _INDENT = ' '*4 # for wrapped signatures
|
|||
_first_param = re.compile(r'(?<=\()\w*\,?\s*')
|
||||
_default_callable_argspec = "See source or doc"
|
||||
_invalid_method = "invalid method signature"
|
||||
_argument_positional = " # '/' marks preceding args as positional-only."
|
||||
|
||||
def get_argspec(ob):
|
||||
'''Return a string describing the signature of a callable object, or ''.
|
||||
|
@ -146,9 +145,6 @@ def get_argspec(ob):
|
|||
else:
|
||||
argspec = ''
|
||||
|
||||
if '/' in argspec and len(argspec) < _MAX_COLS - len(_argument_positional):
|
||||
# Add explanation TODO remove after 3.7, before 3.9.
|
||||
argspec += _argument_positional
|
||||
if isinstance(fob, type) and argspec == '()':
|
||||
# If fob has no argument, use default callable argspec.
|
||||
argspec = _default_callable_argspec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue