From 15625319f6bd7917df8ec891795411554e0015bd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 22 Dec 2023 09:47:31 -0600 Subject: [PATCH] Clean up import (#2087) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + nbconvert/preprocessors/execute.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ba7618b..ab425b612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1430,6 +1430,7 @@ raw template {%- endblock in_prompt -%} """ + exporter_attr = AttrExporter() output_attr, _ = exporter_attr.from_notebook_node(nb) assert "raw template" in output_attr diff --git a/nbconvert/preprocessors/execute.py b/nbconvert/preprocessors/execute.py index 2d6950f4a..e563eeb2e 100644 --- a/nbconvert/preprocessors/execute.py +++ b/nbconvert/preprocessors/execute.py @@ -1,3 +1,6 @@ +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. + """Module containing a preprocessor that executes the code cells and updates outputs""" from __future__ import annotations @@ -7,11 +10,9 @@ from jupyter_client.manager import KernelManager from nbclient.client import NotebookClient from nbclient.client import execute as _execute -from nbclient.exceptions import CellExecutionError # noqa: F401 # Backwards compatibility for imported name -# Copyright (c) IPython Development Team. -# Distributed under the terms of the Modified BSD License. +from nbclient.exceptions import CellExecutionError # noqa: F401 from nbformat import NotebookNode from .base import Preprocessor