Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pre-commit hooks #2161

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-ast
Expand All @@ -21,12 +21,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
rev: 0.30.0
hooks:
- id: check-github-workflows

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.19
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -39,7 +39,7 @@ repos:
types_or: [yaml, html, json]

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]
Expand All @@ -51,7 +51,7 @@ repos:
args: ["-L", "sur,nd,assertin"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.0"
rev: "v1.13.0"
hooks:
- id: mypy
files: "^nbconvert"
Expand Down Expand Up @@ -81,7 +81,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.8.1
hooks:
- id: ruff
types_or: [python, jupyter]
Expand All @@ -90,7 +90,7 @@ repos:
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2024.04.23"
rev: "2024.08.19"
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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 @@ -389,7 +389,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
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
Loading