reimplement sphinx check
@@ -244,6 +244,7 @@ class Options(sc.objdict):
if 'show' not in kwargs:
kwargs['show'] = False
try:
+ if not os.environ.get('SPHINX_BUILD'): # Custom check implemented in conf.py to skip this if we're inside Sphinx
if jupyter == 'retina': # This makes plots much nicer, but isn't available on all systems
import matplotlib_inline
matplotlib_inline.backend_inline.set_matplotlib_formats('retina')
