Skip to content

Commit c4acf78

Browse files
[pre-commit.ci] pre-commit autoupdate (#646)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.5.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.1.4 → v0.11.4](astral-sh/ruff-pre-commit@v0.1.4...v0.11.4) - [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.15.0](pre-commit/mirrors-mypy@v1.6.1...v1.15.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.4.1](codespell-project/codespell@v2.2.6...v2.4.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * TST: update expected outputs * MAINT: adding ruff ignores for the test notebooks * MAINT: fix myst lint error * Do not auto-format include generated notebooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Brigitta Sipőcz <bsipocz@gmail.com>
1 parent fc6f43c commit c4acf78

109 files changed

Lines changed: 760 additions & 662 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ci:
1515
repos:
1616

1717
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.5.0
18+
rev: v5.0.0
1919
hooks:
2020
- id: check-json
2121
- id: check-yaml
@@ -28,14 +28,14 @@ repos:
2828
- id: trailing-whitespace
2929

3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.1.4
31+
rev: v0.11.4
3232
hooks:
3333
- id: ruff
3434
args: ["--fix", "--show-fixes"]
3535
- id: ruff-format
3636

3737
- repo: https://github.com/pre-commit/mirrors-mypy
38-
rev: v1.6.1
38+
rev: v1.15.0
3939
hooks:
4040
- id: mypy
4141
args: [--config-file=pyproject.toml]
@@ -51,7 +51,7 @@ repos:
5151
)$
5252
5353
- repo: https://github.com/codespell-project/codespell
54-
rev: v2.2.6
54+
rev: v2.4.1
5555
hooks:
5656
- id: codespell
5757
args: ["-S", "*.ipynb"]

docs/render/orphaned_nb.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
],
3434
"source": [
3535
"from myst_nb import glue\n",
36+
"\n",
3637
"glue(\"var_text\", \"My orphaned variable!\")\n",
37-
"glue(\"var_float\", 1.0/3.0)"
38+
"glue(\"var_float\", 1.0 / 3.0)"
3839
]
3940
}
4041
],

myst_nb/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A docutils/sphinx parser for Jupyter Notebooks."""
2+
23
__version__ = "1.2.0"
34

45

myst_nb/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A basic CLI for quickstart of a myst_nb project."""
2+
23
from __future__ import annotations
34

45
import argparse
@@ -81,7 +82,7 @@ def generate_conf_py() -> str:
8182
if field.metadata.get("sphinx_exclude"):
8283
continue
8384
if field.metadata.get("help"):
84-
settings += f'{field.metadata.get("help")}\n'
85+
settings += f"{field.metadata.get('help')}\n"
8586
settings += f"nb_{name} = {value!r}\n\n"
8687
content += "\n" + indent(settings, "# ").rstrip() + "\n"
8788

myst_nb/core/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Configuration for myst-nb."""
2+
23
import dataclasses as dc
34
from enum import Enum
45
from typing import Any, Callable, Dict, Iterable, Literal, Optional, Sequence, Tuple

myst_nb/core/execute/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module for executing notebooks."""
2+
23
from __future__ import annotations
34

45
from pathlib import Path

myst_nb/core/execute/cache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Execute a notebook from the cache."""
2+
23
from __future__ import annotations
34

45
from contextlib import nullcontext, suppress
@@ -58,7 +59,7 @@ def start_client(self):
5859
# TODO do in try/except, in case of db write errors
5960
NbProjectRecord.remove_tracebacks([stage_record.pk], cache.db)
6061
cwd_context: ContextManager[str] = (
61-
TemporaryDirectory() # type: ignore
62+
TemporaryDirectory()
6263
if self.nb_config.execution_in_temp
6364
else nullcontext(str(self.path.parent))
6465
)

myst_nb/core/execute/direct.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Execute a notebook directly."""
2+
23
from __future__ import annotations
34

45
from contextlib import nullcontext

myst_nb/core/execute/inline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Execute a notebook inline."""
2+
23
from __future__ import annotations
34

45
import asyncio

myst_nb/core/lexers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Pygments lexers"""
2+
23
from __future__ import annotations
34

45
import re

0 commit comments

Comments
 (0)