We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edcd4f1 commit f8d0e14Copy full SHA for f8d0e14
plotpy/plot/base.py
@@ -1192,7 +1192,8 @@ def add_item(
1192
z (int): the z order (optional, default=None)
1193
autoscale (bool): autoscale the plot (optional, default=True)
1194
"""
1195
- assert hasattr(item, "__implements__")
+ if not hasattr(item, "__implements__"):
1196
+ raise TypeError("item must implement IBasePlotItem interface")
1197
assert itf.IBasePlotItem in item.__implements__
1198
1199
if isinstance(item, qwt.QwtPlotCurve):
0 commit comments