mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-31 21:20:23 +08:00
[docutils] Add parsers.commonmark_wrapper (#14243)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user