inspect.signature throws weird errors sometimes, just make it a bit simpler
Fixes #1031
This commit is contained in:
1 parent
d44385c25e
commit
fc458a3c2a
2 files changed
+16
-1
No files matched your search
@@ -399,7 +399,13 @@ class DirectObjectAccess(object):
|
||||
or obj.__new__ != object.__new__)):
|
||||
raise ValueError
|
||||
|
||||
signature = inspect.signature(obj)
|
||||
try:
|
||||
signature = inspect.signature(obj)
|
||||
except (RuntimeError, TypeError):
|
||||
# Reading the code of the function in Python 3.6 implies there are
|
||||
# at least these errors that might occur if something is wrong with
|
||||
# the signature. In that case we just want a simple escape for now.
|
||||
raise ValueError
|
||||
return [
|
||||
SignatureParam(
|
||||
name=p.name,
|
||||
|
||||
Reference in new issue
Block a user