aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/lib
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-12-18 11:04:10 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-12-18 11:18:13 +0300
commitdcbf444872b81248ce958f05d47abad6e8a237a7 (patch)
treea93610b3dd80f19c5116e4e5885ea2783f6166d3 /contrib/python/ipython/py3/IPython/lib
parente2c38d5aa55a58da33c1dc54792c131023bb7472 (diff)
downloadydb-dcbf444872b81248ce958f05d47abad6e8a237a7.tar.gz
Intermediate changes
commit_hash:1f2ebe313aea1039145a9d68dcd511d5f22f383a
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 94b8ade4ec..cf8ccb0415 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 1d691a7ea6..e0bf80b075 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 f2aa572884..7bea589a51 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]