labscript-suite / labscript

The 𝗹𝗮𝗯𝘀𝗰𝗿𝗶𝗽𝘁 library provides a translation from expressive Python code to low-level hardware instructions.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
9 stars 52 forks source link

labscript_utils.dedent is clobbered in labscript.py #78

Closed zakv closed 3 years ago

zakv commented 3 years ago

In labscript.py, dedent() is imported form labscript_utils before the from pylab import * line. Unfortunately that wildcard import brings in matplotlib.cbook.dedent() which overwrites dedent().

Calling matplotlib.cbook.dedent() gives the warning MatplotlibDeprecationWarning: The dedent function was deprecated in Matplotlib 3.1 and will be removed in 3.3. Use inspect.cleandoc instead so it seems that it will be removed in the future and this issue will go away. Still, given that it's an easy fix I'll just issue a PR to reorder the imports and fix the issue now.