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 Apr 1, 2024
1 parent 0e43c1d commit a68ee9a
Show file tree
Hide file tree
Showing 26 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,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
1 change: 1 addition & 0 deletions check_requirements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Verify that the "all" reqs are in sync."""

import sys

from tomli import load
Expand Down
1 change: 1 addition & 0 deletions docs/api_examples/template_path/make_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Note: nbconvert 6.0 changed ``template_path`` to ``template_paths``
"""

import nbformat
from traitlets.config import Config

Expand Down
1 change: 1 addition & 0 deletions docs/autogen_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
jupyter_nbconvert_config.py.
"""

import os.path

from nbconvert.nbconvertapp import NbConvertApp
Expand Down
1 change: 1 addition & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom build script for hatch backend"""

import os
import sys
from urllib.request import urlopen
Expand Down
1 change: 1 addition & 0 deletions nbconvert/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""nbconvert cli entry point."""

from .nbconvertapp import main

main()
1 change: 1 addition & 0 deletions nbconvert/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""nbconvert version info."""

import re
from typing import List

Expand Down
1 change: 1 addition & 0 deletions nbconvert/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest configuration."""

import asyncio
import os

Expand Down
1 change: 1 addition & 0 deletions nbconvert/exporters/qt_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A qt exporter."""

import os
import sys
import tempfile
Expand Down
1 change: 1 addition & 0 deletions nbconvert/exporters/qt_screenshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A qt screenshot exporter."""

import os

try:
Expand Down
1 change: 1 addition & 0 deletions nbconvert/filters/filter_links.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""A pandoc filter used in converting notebooks to Latex.
Converts links between notebooks to Latex cross-references.
"""

import re

from pandocfilters import RawInline, applyJSONFilters, stringify # type:ignore[import-untyped]
Expand Down
1 change: 0 additions & 1 deletion nbconvert/filters/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.


import re

try:
Expand Down
1 change: 0 additions & 1 deletion nbconvert/filters/markdown_mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.


import base64
import mimetypes
import os
Expand Down
1 change: 1 addition & 0 deletions nbconvert/filters/pandoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Convert between any two formats using pandoc,
and related filters
"""

import os

from pandocfilters import Image, applyJSONFilters # type:ignore[import-untyped]
Expand Down
1 change: 1 addition & 0 deletions nbconvert/preprocessors/coalescestreams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Preprocessor for merging consecutive stream outputs for easier handling."""

import re

# Copyright (c) IPython Development Team.
Expand Down
1 change: 0 additions & 1 deletion nbconvert/preprocessors/convertfigures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


from traitlets import Unicode

from .base import Preprocessor
Expand Down
3 changes: 1 addition & 2 deletions nbconvert/preprocessors/csshtmlheader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Module that pre-processes the notebook for export to HTML.
"""
"""Module that pre-processes the notebook for export to HTML."""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
Expand Down
1 change: 1 addition & 0 deletions nbconvert/preprocessors/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

"""Module containing a preprocessor that executes the code cells
and updates outputs"""

from __future__ import annotations

import typing as t
Expand Down
1 change: 0 additions & 1 deletion nbconvert/preprocessors/highlightmagics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


import re

from traitlets import Dict
Expand Down
1 change: 0 additions & 1 deletion nbconvert/preprocessors/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# Imports
# -----------------------------------------------------------------------------


from traitlets import List, Unicode

from .base import Preprocessor
Expand Down
1 change: 0 additions & 1 deletion nbconvert/utils/_contextlib_chdir.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Backport of Python 3.11's contextlib.chdir."""


import os
from contextlib import AbstractContextManager

Expand Down
2 changes: 1 addition & 1 deletion nbconvert/utils/iso639_1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" List of ISO639-1 language code"""
"""List of ISO639-1 language code"""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
Expand Down
1 change: 1 addition & 0 deletions nbconvert/utils/lexers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Deprecated as of 5.0; import from IPython.lib.lexers instead."""

from warnings import warn

warn("nbconvert.utils.lexers is deprecated as of 5.0. Use IPython.lib.lexers", stacklevel=2)
Expand Down
1 change: 0 additions & 1 deletion nbconvert/utils/pandoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.


import re
import shutil
import subprocess
Expand Down
1 change: 1 addition & 0 deletions nbconvert/utils/text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Text related utils."""

import os
import re

Expand Down
1 change: 0 additions & 1 deletion tests/filters/test_ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


from nbconvert.filters.ansi import ansi2html, ansi2latex, strip_ansi
from tests.base import TestsBase

Expand Down

0 comments on commit a68ee9a

Please sign in to comment.