Skip to content

Commit abcc087

Browse files
authored
🔧 pre-commit autoupdate (#894)
1 parent e238b6b commit abcc087

35 files changed

Lines changed: 50 additions & 20 deletions

.github/workflows/docutils_setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Script to convert package setup to myst-docutils."""
3+
34
import sys
45

56
import tomlkit

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ repos:
2121
- id: trailing-whitespace
2222

2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.1.11
24+
rev: v0.3.4
2525
hooks:
2626
- id: ruff
2727
args: [--fix]
2828
- id: ruff-format
2929

3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.8.0
31+
rev: v1.9.0
3232
hooks:
3333
- id: mypy
3434
args: [--config-file=pyproject.toml]

myst_parser/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
with bridges to [docutils](https://docutils.sourceforge.io/)
33
and [Sphinx](https://github.com/sphinx-doc/sphinx).
44
"""
5+
56
__version__ = "2.0.0"
67

78

myst_parser/_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Helpers for cross compatibility across dependency versions."""
2+
23
from typing import Callable, Iterable
34

45
from docutils.nodes import Element

myst_parser/_docs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Code to use internally, for documentation."""
2+
23
from __future__ import annotations
34

45
import contextlib

myst_parser/config/dc_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Validators for dataclasses, mirroring those of https://github.com/python-attrs/attrs."""
2+
23
from __future__ import annotations
34

45
import dataclasses as dc
@@ -37,8 +38,7 @@ def validate_fields(inst: Any) -> None:
3738
class ValidatorType(Protocol):
3839
def __call__(
3940
self, inst: Any, field: dc.Field, value: Any, suffix: str = ""
40-
) -> None:
41-
...
41+
) -> None: ...
4242

4343

4444
def any_(inst, field, value, suffix=""):

myst_parser/config/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The configuration for the myst parser."""
2+
23
import dataclasses as dc
34
from importlib import import_module
45
from typing import (

myst_parser/docutils_.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
.. include:: path/to/file.md
66
:parser: myst_parser.docutils_
77
"""
8+
89
from myst_parser.parsers.docutils_ import Parser # noqa: F401

myst_parser/inventory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
This is adapted from the Sphinx inventory.py module.
66
We replicate it here, so that it can be used without Sphinx.
77
"""
8+
89
from __future__ import annotations
910

1011
import argparse

myst_parser/mdit_to_docutils/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Convert Markdown-it tokens to docutils nodes."""
2+
23
from __future__ import annotations
34

45
import inspect
@@ -260,9 +261,9 @@ def _render_finalise(self) -> None:
260261
# save for later reference resolution
261262
self.document.myst_slugs = self._heading_slugs
262263
if self._heading_slugs and self.sphinx_env:
263-
self.sphinx_env.metadata[self.sphinx_env.docname][
264-
"myst_slugs"
265-
] = self._heading_slugs
264+
self.sphinx_env.metadata[self.sphinx_env.docname]["myst_slugs"] = (
265+
self._heading_slugs
266+
)
266267

267268
# log warnings for duplicate reference definitions
268269
# "duplicate_refs": [{"href": "ijk", "label": "B", "map": [4, 5], "title": ""}],

0 commit comments

Comments
 (0)