diff options
| author | Alexander Smirnov <[email protected]> | 2024-12-19 08:16:17 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2024-12-19 08:16:17 +0000 |
| commit | c1c806d731fa634503bf452ee3c603ed956abe2c (patch) | |
| tree | f2a69c7615b518119f1c895672544ce8ad1a4fe4 /contrib/python/ipython/py3/IPython/lib/latextools.py | |
| parent | 892a954b648dfce3da44ad433b2258e303b08b06 (diff) | |
| parent | bb0840c0025a75dd3b85b746ebcec7deb7d9fe1c (diff) | |
Merge branch 'rightlib' into mergelibs-241219-0815
Diffstat (limited to 'contrib/python/ipython/py3/IPython/lib/latextools.py')
| -rw-r--r-- | contrib/python/ipython/py3/IPython/lib/latextools.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/python/ipython/py3/IPython/lib/latextools.py b/contrib/python/ipython/py3/IPython/lib/latextools.py index f2aa5728844..7bea589a513 100644 --- a/contrib/python/ipython/py3/IPython/lib/latextools.py +++ b/contrib/python/ipython/py3/IPython/lib/latextools.py @@ -18,7 +18,6 @@ from IPython.utils.process import find_cmd, FindCmdError from traitlets.config import get_config from traitlets.config.configurable import SingletonConfigurable from traitlets import List, Bool, Unicode -from IPython.utils.py3compat import cast_unicode class LaTeXTool(SingletonConfigurable): @@ -58,8 +57,9 @@ class LaTeXTool(SingletonConfigurable): ).tag(config=True) -def latex_to_png(s, encode=False, backend=None, wrap=False, color='Black', - scale=1.0): +def latex_to_png( + s: str, encode=False, backend=None, wrap=False, color="Black", scale=1.0 +): """Render a LaTeX string to PNG. Parameters @@ -80,7 +80,7 @@ def latex_to_png(s, encode=False, backend=None, wrap=False, color='Black', None is returned when the backend cannot be used. """ - s = cast_unicode(s) + assert isinstance(s, str) allowed_backends = LaTeXTool.instance().backends if backend is None: backend = allowed_backends[0] |
