From 2e2b62fd0c02c11f0981d3e80ec0924b9dfc1b0e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 22 Jun 2023 08:03:57 -0500 Subject: [PATCH] Fix lint error --- nbconvert/exporters/templateexporter.py | 2 +- nbconvert/filters/tests/test_highlight.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nbconvert/exporters/templateexporter.py b/nbconvert/exporters/templateexporter.py index 787031efd..d99406e4a 100644 --- a/nbconvert/exporters/templateexporter.py +++ b/nbconvert/exporters/templateexporter.py @@ -539,7 +539,7 @@ def _init_preprocessors(self): # * We rely on recursive_update, which can only merge dicts, lists will be overwritten # * We can use the key with numerical prefixing to guarantee ordering (/etc/*.d/XY-file style) # * We can disable preprocessors by overwriting the value with None - for _, preprocessor in sorted(preprocessors.items(), key=lambda x: x[0]): # type:ignore + for _, preprocessor in sorted(preprocessors.items(), key=lambda x: x[0]): if preprocessor is not None: kwargs = preprocessor.copy() preprocessor_cls = kwargs.pop("type") diff --git a/nbconvert/filters/tests/test_highlight.py b/nbconvert/filters/tests/test_highlight.py index d9e306461..98a9a18fa 100644 --- a/nbconvert/filters/tests/test_highlight.py +++ b/nbconvert/filters/tests/test_highlight.py @@ -79,9 +79,7 @@ def test_inject_html(self): assert "" not in out def _extract_tokens(self, root, cls): - return set( # noqa - map(lambda x: x.text, root.findall(".//*[@class='" + cls + "']")) # type:ignore - ) + return set(map(lambda x: x.text, root.findall(".//*[@class='" + cls + "']"))) # noqa def _try_highlight(self, method, test, tokens): """Try highlighting source, look for key tokens"""