summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/lib
diff options
context:
space:
mode:
authorAlexander Smirnov <[email protected]>2024-12-19 08:16:17 +0000
committerAlexander Smirnov <[email protected]>2024-12-19 08:16:17 +0000
commitc1c806d731fa634503bf452ee3c603ed956abe2c (patch)
treef2a69c7615b518119f1c895672544ce8ad1a4fe4 /contrib/python/ipython/py3/IPython/lib
parent892a954b648dfce3da44ad433b2258e303b08b06 (diff)
parentbb0840c0025a75dd3b85b746ebcec7deb7d9fe1c (diff)
Merge branch 'rightlib' into mergelibs-241219-0815
Diffstat (limited to 'contrib/python/ipython/py3/IPython/lib')
-rw-r--r--contrib/python/ipython/py3/IPython/lib/__init__.py4
-rw-r--r--contrib/python/ipython/py3/IPython/lib/clipboard.py1
-rw-r--r--contrib/python/ipython/py3/IPython/lib/latextools.py8
3 files changed, 7 insertions, 6 deletions
diff --git a/contrib/python/ipython/py3/IPython/lib/__init__.py b/contrib/python/ipython/py3/IPython/lib/__init__.py
index 94b8ade4ec9..cf8ccb04151 100644
--- a/contrib/python/ipython/py3/IPython/lib/__init__.py
+++ b/contrib/python/ipython/py3/IPython/lib/__init__.py
@@ -3,9 +3,9 @@
Extra capabilities for IPython
"""
-#-----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
-#-----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
diff --git a/contrib/python/ipython/py3/IPython/lib/clipboard.py b/contrib/python/ipython/py3/IPython/lib/clipboard.py
index 1d691a7ea63..e0bf80b0755 100644
--- a/contrib/python/ipython/py3/IPython/lib/clipboard.py
+++ b/contrib/python/ipython/py3/IPython/lib/clipboard.py
@@ -1,5 +1,6 @@
""" Utilities for accessing the platform's clipboard.
"""
+
import os
import subprocess
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]