Skip to content

Commit 9b6914a

Browse files
authored
hotfix for signature inspection exception (#79)
1 parent aef08dd commit 9b6914a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

magicgui/widgets/_concrete.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ def merge_super_sigs(cls, exclude=("widget_type", "kwargs", "args", "kwds", "ext
4848
params = {}
4949
param_docs = []
5050
for sup in reversed(inspect.getmro(cls)):
51-
sig = inspect.signature(getattr(sup, "__init__"))
51+
try:
52+
sig = inspect.signature(getattr(sup, "__init__"))
53+
# in some environments `object` or `abc.ABC` will raise ValueError here
54+
except ValueError:
55+
continue
5256
for name, param in sig.parameters.items():
5357
if name in exclude:
5458
continue

0 commit comments

Comments
 (0)