mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Use unwrap before isbuiltin check
`inspect.isbuiltin` does not unwrap obj, but `inspect.signature` does,
which can result in a ValueError.
>>> wx.Bell
<built-in function Bell>
>>> bell #= dcor(wx.Bell)
<function Bell at 0x0000015E53D92B60>
>>> inspect.isbuiltin(bell)
False
>>> inspect.signature(bell)
... (snip) ...
ValueError: no signature found for builtin <built-in function Bell>
This commit is contained in:
@@ -171,6 +171,7 @@ def getCallTip(command='', locals=None):
|
||||
pass
|
||||
tip1 = ''
|
||||
argspec = ''
|
||||
obj = inspect.unwrap(obj)
|
||||
if inspect.isbuiltin(obj):
|
||||
# Builtin functions don't have an argspec that we can get.
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user