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 8, 2024
1 parent a507d0e commit e43ea27
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
`tox -e docs-clean` and `tox -e docs-update`,
or directly: `sphinx-build -n -W --keep-going docs/source docs/_build`
"""

from rst_to_myst import __version__

project = "RST-to-MyST"
Expand Down
1 change: 1 addition & 0 deletions rst_to_myst/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convert RST to MyST-Markdown."""

from .mdformat_render import rst_to_myst
from .namespace import compile_namespace
from .parser import to_docutils_ast
Expand Down
1 change: 1 addition & 0 deletions rst_to_myst/inliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
embedded uri `uri <a.org>`_
--------------- --------------- --------------------------------------------------------
"""

import re
from typing import Any, Callable, List, Match, Pattern, Tuple

Expand Down
1 change: 1 addition & 0 deletions rst_to_myst/markdownit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convert to markdown-it tokens, which can then be rendered by mdformat."""

from io import StringIO
from textwrap import indent
from typing import IO, Any, Dict, List, NamedTuple, Optional, Tuple
Expand Down
7 changes: 4 additions & 3 deletions rst_to_myst/states.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""docutils states."""

import re
from typing import List, Optional

Expand Down Expand Up @@ -121,9 +122,9 @@ def directive(self, match, **option_presets):
# directive_class, messages = directives.directive(
# type_name, self.memo.language, self.document
# )
directive_class: Optional[
Directive
] = self.document.settings.namespace.get_directive(type_name)
directive_class: Optional[Directive] = (
self.document.settings.namespace.get_directive(type_name)
)

# default to eval rst
if directive_class is None:
Expand Down

0 comments on commit e43ea27

Please sign in to comment.