This commit is contained in:
lda committed 2026-08-30 10:25:26 +07:00 Verified
1 parent ad716bfb7f
commit 85adbcf37d
3 files changed
+7 -9

No files matched your search

+5 -7
View File
@@ -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)