fmt
This commit is contained in:
@@ -21,8 +21,8 @@ from .models import (
|
||||
)
|
||||
from .shell import (
|
||||
Shell,
|
||||
isolate_output_history,
|
||||
carefully_setup_shell,
|
||||
isolate_output_history,
|
||||
run_cell_and_collect,
|
||||
setup_shell,
|
||||
)
|
||||
|
||||
@@ -252,9 +252,7 @@ def carefully_setup_shell(
|
||||
if execution_magics.default_runner is None:
|
||||
execution_magics.default_runner = mpl_runner(shell.safe_execfile)
|
||||
|
||||
clobbered = (
|
||||
enable_pylab_lite(shell, import_all=import_all) if pylab else []
|
||||
)
|
||||
clobbered = enable_pylab_lite(shell, import_all=import_all) if pylab else []
|
||||
return selected_gui, backend, clobbered
|
||||
|
||||
|
||||
@@ -265,7 +263,9 @@ def inline_support_present(shell: InteractiveShell, backend: str) -> bool:
|
||||
"inline",
|
||||
"module://matplotlib_inline.backend_inline",
|
||||
}
|
||||
return (flush_figures in callbacks) if is_inline else (flush_figures not in callbacks)
|
||||
return (
|
||||
(flush_figures in callbacks) if is_inline else (flush_figures not in callbacks)
|
||||
)
|
||||
|
||||
|
||||
def figure_formats_for(shell: InteractiveShell) -> set[str]:
|
||||
@@ -297,9 +297,7 @@ def enable_pylab_lite(
|
||||
ignored = {"__builtins__"}
|
||||
candidates = set(pylab_ns).intersection(shell.user_ns).difference(ignored)
|
||||
clobbered = [
|
||||
name
|
||||
for name in candidates
|
||||
if shell.user_ns[name] is not pylab_ns[name]
|
||||
name for name in candidates if shell.user_ns[name] is not pylab_ns[name]
|
||||
]
|
||||
|
||||
shell.user_ns.update(pylab_ns)
|
||||
|
||||
+1
-1
@@ -2,8 +2,8 @@ import unittest
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ipython_shell import App, AppInfo
|
||||
from ipython_mcp.app import app as mcp_app
|
||||
from ipython_shell import App, AppInfo
|
||||
from ipython_webapp.app import app as web_app
|
||||
from langchain_demo.ipython_wrapper import get_app_info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user