Skip to content

Commit b663bac

Browse files
[pre-commit.ci] pre-commit autoupdate (#671)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.8...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) * Fix mypy errors --------- 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 dce2bbe commit b663bac

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ repos:
2828
- id: trailing-whitespace
2929

3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.11.8
31+
rev: v0.11.12
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.15.0
38+
rev: v1.16.0
3939
hooks:
4040
- id: mypy
4141
args: [--config-file=pyproject.toml]

myst_nb/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def __getitem__(self, field: str) -> Any:
576576
def get_cell_level_config(
577577
self,
578578
field_name: str,
579-
cell_metadata: Dict[str, Any],
579+
cell_metadata: Any,
580580
warning_callback: Callable[[str, MystNBWarnings], Any],
581581
) -> Any:
582582
"""Get a configuration value at the cell level.

myst_nb/core/read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def create_nb_reader(
7979
if commonmark_only:
8080
# Markdown cells should be read as Markdown only
8181
md_config = dc.replace(md_config, commonmark_only=True)
82-
return NbReader(partial(reader, **(reader_kwargs or {})), md_config) # type: ignore
82+
return NbReader(partial(reader, **(reader_kwargs or {})), md_config)
8383

8484
# a Markdown file is a special case, since we only treat it as a notebook,
8585
# if it starts with certain "top-matter"

myst_nb/sphinx_ext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ def sphinx_setup(app: Sphinx):
5353
for name, default, field in NbParserConfig().as_triple():
5454
if not field.metadata.get("sphinx_exclude"):
5555
# TODO add types?
56-
app.add_config_value(f"nb_{name}", default, "env", Any) # type: ignore[arg-type]
56+
app.add_config_value(f"nb_{name}", default, "env", Any)
5757
if "legacy_name" in field.metadata:
5858
app.add_config_value(
5959
f"{field.metadata['legacy_name']}",
6060
_UNSET,
6161
"env",
62-
Any, # type: ignore[arg-type]
62+
Any,
6363
)
6464
# Handle non-standard deprecation
65-
app.add_config_value("nb_render_priority", _UNSET, "env", Any) # type: ignore[arg-type]
65+
app.add_config_value("nb_render_priority", _UNSET, "env", Any)
6666

6767
# generate notebook configuration from Sphinx configuration
6868
# this also validates the configuration values

0 commit comments

Comments
 (0)