From 15b2bc2e215bc3d0ab37508eeeb624ede5da0d36 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 21 Dec 2023 11:04:37 -0600 Subject: [PATCH] Restore removed import (#2086) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + nbconvert/preprocessors/execute.py | 1 + pyproject.toml | 7 +++---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b9a60741..1224c3f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1416,6 +1416,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 5e8403350..2d6950f4a 100644 --- a/nbconvert/preprocessors/execute.py +++ b/nbconvert/preprocessors/execute.py @@ -7,6 +7,7 @@ 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. diff --git a/pyproject.toml b/pyproject.toml index 4474667ac..b849ae88c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -221,10 +221,9 @@ ignore = [ "RUF012", # Mutable class attributes should be annotated ] unfixable = [ - # Don't touch print statements - "T201", - # Don't touch noqa lines - "RUF100", + "T201", # Don't touch print statements + "RUF100", # Don't touch noqa lines + "F401", # Unused imports ] [tool.ruff.lint.per-file-ignores]