-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Milestone
Description
In powderpattern.py there are 4 occurrences of bear except statements. Not exactly sure which error type is expected, so added # noqa E722 for now to silence checkers.
While trying to figure it out, there are also two ax.draw() statements inside the try-except that looks a bit weird. For example in src/pyobjcryst/powderpattern.py:219-226:
try:
# Force immediate display. Not supported on all backends (e.g. nbagg)
ax.draw()
self._plot_fig.canvas.draw()
if "ipympl" not in plt.get_backend():
plt.pause(0.001)
except: # noqa E722
pass
For python=3.13 and matplotlib=3.10.3 the ax.draw() will directly give TypeError as draw() in Artist class requires renderer as parameter, which is not given here. Thus this try-except statement will always result in pass. However it seems like this will actually gives the expected behavior, according to descriptions in examples/structure-solution-powder-cimetidine.ipynb.
Metadata
Metadata
Assignees
Labels
No labels