[docutils] Add parsers.commonmark_wrapper (#14243)

This commit is contained in:
Semyon Moroz
2025-07-07 17:41:55 +02:00
committed by GitHub
parent 0ca73211f3
commit 28d8ff1a80
2 changed files with 12 additions and 1 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ docutils.nodes.NodeVisitor.depart_\w+ # Methods are discovered dynamically on c
docutils.nodes.NodeVisitor.visit_\w+ # Methods are discovered dynamically on commonly-used subclasses
# these methods take a rawsource parameter that has been deprecated and is completely ignored, so we omit it from the stub
docutils.nodes.Text.__new__
docutils.parsers.recommonmark_wrapper
docutils.parsers.commonmark_wrapper # doesn't exist at runtime of stubtests
docutils.parsers.recommonmark_wrapper # doesn't exist at runtime of stubtests
docutils.parsers.rst.directives.admonitions.BaseAdmonition.node_class # must be overridden by base classes (pseudo-abstract)
docutils.statemachine.State.nested_sm # is initialised in __init__
docutils.statemachine.State.nested_sm_kwargs # is initialised in __init__
@@ -0,0 +1,10 @@
from typing import Literal
from typing_extensions import TypeAlias
from docutils import parsers
_ParserName: TypeAlias = Literal["pycmark", "myst", "recommonmark"]
commonmark_parser_names: tuple[_ParserName, ...]
Parser: type[parsers.Parser] # if Parser is None or parser_name is empty string, user cannot import current module
parser_name: _ParserName