Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 7, 2025
1 parent 7c3a60b commit ddfc0ff
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 60 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

### Bugs fixed

- \[HTMLExporter\] Initialize resources before widget filtering [#2118](https://github.com/jupyter/nbconvert/pull/2118) ([@yuvipanda](https://github.com/yuvipanda))
- [HTMLExporter] Initialize resources before widget filtering [#2118](https://github.com/jupyter/nbconvert/pull/2118) ([@yuvipanda](https://github.com/yuvipanda))

### Contributors to this release

Expand Down Expand Up @@ -416,7 +416,7 @@

### Enhancements made

- \[Accessibility\] some accessibility improvements [#2021](https://github.com/jupyter/nbconvert/pull/2021) ([@brichet](https://github.com/brichet))
- [Accessibility] some accessibility improvements [#2021](https://github.com/jupyter/nbconvert/pull/2021) ([@brichet](https://github.com/brichet))
- Adopt playwright [#2013](https://github.com/jupyter/nbconvert/pull/2013) ([@brichet](https://github.com/brichet))
- Update to Jupyterlab 4 [#2012](https://github.com/jupyter/nbconvert/pull/2012) ([@brichet](https://github.com/brichet))

Expand Down Expand Up @@ -1613,6 +1613,7 @@ raw template
{%- endblock in_prompt -%}
"""


exporter_attr = AttrExporter()
output_attr, _ = exporter_attr.from_notebook_node(nb)
assert "raw template" in output_attr
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter
source code, in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories.
Expand Down
20 changes: 10 additions & 10 deletions nbconvert/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,9 @@


__all__ = [
"__version__",
"version_info",
"filters",
"postprocessors",
"preprocessors",
"writers",
"ASCIIDocExporter",
"ExporterNameError",
"export",
"get_export_names",
"get_exporter",
"Exporter",
"ExporterNameError",
"FilenameExtension",
"HTMLExporter",
"LatexExporter",
Expand All @@ -58,4 +49,13 @@
"SlidesExporter",
"TemplateExporter",
"WebPDFExporter",
"__version__",
"export",
"filters",
"get_export_names",
"get_exporter",
"postprocessors",
"preprocessors",
"version_info",
"writers",
]
12 changes: 6 additions & 6 deletions nbconvert/exporters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@

__all__ = [
"ASCIIDocExporter",
"ExporterNameError",
"ExporterDisabledError",
"export",
"get_export_names",
"get_exporter",
"Exporter",
"ExporterDisabledError",
"ExporterNameError",
"FilenameExtension",
"HTMLExporter",
"LatexExporter",
Expand All @@ -32,10 +29,13 @@
"PythonExporter",
"QtPDFExporter",
"QtPNGExporter",
"ResourcesDict",
"RSTExporter",
"ResourcesDict",
"ScriptExporter",
"SlidesExporter",
"TemplateExporter",
"WebPDFExporter",
"export",
"get_export_names",
"get_exporter",
]
6 changes: 3 additions & 3 deletions nbconvert/exporters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# -----------------------------------------------------------------------------

__all__ = [
"export",
"Exporter",
"get_exporter",
"get_export_names",
"ExporterNameError",
"export",
"get_export_names",
"get_exporter",
]


Expand Down
44 changes: 22 additions & 22 deletions nbconvert/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,38 @@
)

__all__ = [
"indent",
"ansi2html",
"ansi2latex",
"strip_ansi",
"citation2latex",
"ConvertExplicitlyRelativePaths",
"DataTypeFilter",
"Highlight2HTML",
"Highlight2Latex",
"add_anchor",
"add_prompts",
"ansi2html",
"ansi2latex",
"ascii_only",
"citation2latex",
"clean_html",
"comment_lines",
"convert_pandoc",
"escape_latex",
"get_lines",
"get_metadata",
"html2text",
"indent",
"ipython2python",
"markdown2asciidoc",
"markdown2html",
"markdown2html_pandoc",
"markdown2html_mistune",
"markdown2html_pandoc",
"markdown2latex",
"markdown2rst",
"markdown2asciidoc",
"get_metadata",
"convert_pandoc",
"ConvertExplicitlyRelativePaths",
"wrap_text",
"html2text",
"clean_html",
"add_anchor",
"strip_dollars",
"strip_files_prefix",
"comment_lines",
"get_lines",
"ipython2python",
"posix_path",
"path2url",
"add_prompts",
"ascii_only",
"posix_path",
"prevent_list_blocks",
"strip_ansi",
"strip_dollars",
"strip_files_prefix",
"strip_trailing_newline",
"text_base64",
"wrap_text",
]
2 changes: 1 addition & 1 deletion nbconvert/filters/ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import markupsafe

__all__ = ["strip_ansi", "ansi2html", "ansi2latex"]
__all__ = ["ansi2html", "ansi2latex", "strip_ansi"]

_ANSI_RE = re.compile("\x1b\\[(.*?)([@-~])")

Expand Down
4 changes: 2 additions & 2 deletions nbconvert/filters/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def markdown2html_mistune(source: str) -> str:
from .pandoc import convert_pandoc

__all__ = [
"markdown2asciidoc",
"markdown2html",
"markdown2html_pandoc",
"markdown2html_mistune",
"markdown2html_pandoc",
"markdown2latex",
"markdown2rst",
"markdown2asciidoc",
]


Expand Down
16 changes: 8 additions & 8 deletions nbconvert/filters/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@
from nbconvert.preprocessors.sanitize import _get_default_css_sanitizer

__all__ = [
"wrap_text",
"html2text",
"clean_html",
"add_anchor",
"strip_dollars",
"strip_files_prefix",
"add_prompts",
"ascii_only",
"clean_html",
"comment_lines",
"get_lines",
"html2text",
"ipython2python",
"posix_path",
"path2url",
"add_prompts",
"ascii_only",
"posix_path",
"prevent_list_blocks",
"strip_dollars",
"strip_files_prefix",
"strip_trailing_newline",
"text_base64",
"wrap_text",
]


Expand Down
4 changes: 2 additions & 2 deletions nbconvert/preprocessors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
from .tagremove import TagRemovePreprocessor

__all__ = [
"CSSHTMLHeaderPreprocessor",
"CellExecutionError",
"Preprocessor",
"ClearMetadataPreprocessor",
"ClearOutputPreprocessor",
"CoalesceStreamsPreprocessor",
"ConvertFiguresPreprocessor",
"CSSHTMLHeaderPreprocessor",
"ExecutePreprocessor",
"ExtractAttachmentsPreprocessor",
"ExtractOutputPreprocessor",
"HighlightMagicsPreprocessor",
"LatexPreprocessor",
"Preprocessor",
"RegexRemovePreprocessor",
"SVG2PDFPreprocessor",
"TagRemovePreprocessor",
Expand Down
2 changes: 1 addition & 1 deletion tests/exporters/test_webpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TestWebPDFExporter(ExportersTestsBase):

exporter_class = WebPDFExporter # type:ignore

@pytest.mark.network()
@pytest.mark.network
def test_export(self):
"""
Can a TemplateExporter export something?
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_filename_spaces(self):
assert os.path.isfile("notebook with spaces.pdf")

@flaky
@pytest.mark.network()
@pytest.mark.network
@pytest.mark.skipif(not PLAYWRIGHT_INSTALLED, reason="Playwright not installed")
def test_webpdf_with_chromium(self):
"""
Expand Down

0 comments on commit ddfc0ff

Please sign in to comment.