From 85adbcf37da7066d053616dd05b727511f310f4a Mon Sep 17 00:00:00 2001 From: lda Date: Sun, 30 Aug 2026 10:25:26 +0700 Subject: [PATCH] fmt --- src/ipython_shell/__init__.py | 2 +- src/ipython_shell/shell.py | 12 +++++------- tests/test_info.py | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/ipython_shell/__init__.py b/src/ipython_shell/__init__.py index 4035a00..9137e59 100644 --- a/src/ipython_shell/__init__.py +++ b/src/ipython_shell/__init__.py @@ -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, ) diff --git a/src/ipython_shell/shell.py b/src/ipython_shell/shell.py index ee65180..8cb0c4c 100644 --- a/src/ipython_shell/shell.py +++ b/src/ipython_shell/shell.py @@ -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) diff --git a/tests/test_info.py b/tests/test_info.py index 9f883fb..59aee3f 100644 --- a/tests/test_info.py +++ b/tests/test_info.py @@ -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