diff --git a/third_party/2and3/markdown/__init__.pyi b/third_party/2and3/markdown/__init__.pyi index 07ef67f1e..3f57adcc4 100644 --- a/third_party/2and3/markdown/__init__.pyi +++ b/third_party/2and3/markdown/__init__.pyi @@ -1 +1,2 @@ from .core import Markdown as Markdown, markdown as markdown, markdownFromFile as markdownFromFile +from .extensions import Extension as Extension diff --git a/third_party/2and3/markdown/blockprocessors.pyi b/third_party/2and3/markdown/blockprocessors.pyi index 8c78bbe7b..0637d278d 100644 --- a/third_party/2and3/markdown/blockprocessors.pyi +++ b/third_party/2and3/markdown/blockprocessors.pyi @@ -19,19 +19,13 @@ class ListIndentProcessor(BlockProcessor): LIST_TYPES: Any INDENT_RE: Pattern def __init__(self, *args) -> None: ... - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... def create_item(self, parent, block) -> None: ... def get_level(self, parent, block): ... -class CodeBlockProcessor(BlockProcessor): - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... +class CodeBlockProcessor(BlockProcessor): ... class BlockQuoteProcessor(BlockProcessor): RE: Pattern - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... def clean(self, line): ... class OListProcessor(BlockProcessor): @@ -43,8 +37,6 @@ class OListProcessor(BlockProcessor): CHILD_RE: Pattern INDENT_RE: Pattern def __init__(self, parser) -> None: ... - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... def get_items(self, block): ... class UListProcessor(OListProcessor): @@ -54,25 +46,14 @@ class UListProcessor(OListProcessor): class HashHeaderProcessor(BlockProcessor): RE: Pattern - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... class SetextHeaderProcessor(BlockProcessor): RE: Pattern - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... class HRProcessor(BlockProcessor): RE: str = ... SEARCH_RE: Pattern match: Any - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... -class EmptyBlockProcessor(BlockProcessor): - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... - -class ParagraphProcessor(BlockProcessor): - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... +class EmptyBlockProcessor(BlockProcessor): ... +class ParagraphProcessor(BlockProcessor): ... diff --git a/third_party/2and3/markdown/core.pyi b/third_party/2and3/markdown/core.pyi index b973435fe..4d8dadfaa 100644 --- a/third_party/2and3/markdown/core.pyi +++ b/third_party/2and3/markdown/core.pyi @@ -1,14 +1,23 @@ -from typing import Any, BinaryIO, Mapping, Optional, Sequence, Text, TextIO, Union +from typing import Any, BinaryIO, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, Text, TextIO, Union from typing_extensions import Literal +from xml.etree.ElementTree import Element +from .blockparser import BlockParser from .extensions import Extension -from .util import Registry +from .util import HtmlStash, Registry class Markdown: preprocessors: Registry inlinePatterns: Registry treeprocessors: Registry postprocessors: Registry + parser: BlockParser + htmlStash: HtmlStash + output_formats: ClassVar[Dict[Literal["xhtml", "html"], Callable[[Element], Text]]] + output_format: Literal["xhtml", "html"] + serializer: Callable[[Element], Text] + tab_length: int + block_level_elements: List[str] def __init__( self, *, diff --git a/third_party/2and3/markdown/extensions/__init__.pyi b/third_party/2and3/markdown/extensions/__init__.pyi index eedc24829..11d3b3052 100644 --- a/third_party/2and3/markdown/extensions/__init__.pyi +++ b/third_party/2and3/markdown/extensions/__init__.pyi @@ -1,13 +1,13 @@ -from typing import Mapping, Sequence +from typing import Any, Dict, List, Mapping, Tuple from markdown.core import Markdown class Extension: - config: Mapping[str, str] = ... - def __init__(self, **kwargs: Mapping[str, str]) -> None: ... - def getConfig(self, key: str, default: str = ...) -> str: ... - def getConfigs(self) -> Mapping[str, str]: ... - def getConfigInfo(self) -> Sequence[Mapping[str, str]]: ... - def setConfig(self, key: str, value: str) -> None: ... - def setConfigs(self, items: Mapping[str, str]) -> None: ... + config: Mapping[str, List[Any]] = ... + def __init__(self, **kwargs: Any) -> None: ... + def getConfig(self, key: str, default: Any = ...) -> Any: ... + def getConfigs(self) -> Dict[str, Any]: ... + def getConfigInfo(self) -> List[Tuple[str, str]]: ... + def setConfig(self, key: str, value: Any) -> None: ... + def setConfigs(self, items: Mapping[str, Any]) -> None: ... def extendMarkdown(self, md: Markdown) -> None: ... diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi index 3655f9223..9316c65f8 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -1,20 +1,16 @@ from typing import Any, Pattern +from markdown.blockprocessors import BlockProcessor from markdown.extensions import Extension from markdown.inlinepatterns import InlineProcessor -from markdown.preprocessors import Preprocessor ABBR_REF_RE: Pattern -class AbbrExtension(Extension): - def extendMarkdown(self, md) -> None: ... - -class AbbrPreprocessor(Preprocessor): - def run(self, lines): ... +class AbbrExtension(Extension): ... +class AbbrPreprocessor(BlockProcessor): ... class AbbrInlineProcessor(InlineProcessor): title: Any def __init__(self, pattern, title) -> None: ... - def handleMatch(self, m, data): ... # type: ignore def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi index 9b7ed3ee0..24005e29f 100644 --- a/third_party/2and3/markdown/extensions/admonition.pyi +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -3,16 +3,13 @@ from typing import Any, Pattern from markdown.blockprocessors import BlockProcessor from markdown.extensions import Extension -class AdmonitionExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class AdmonitionExtension(Extension): ... class AdmonitionProcessor(BlockProcessor): CLASSNAME: str = ... CLASSNAME_TITLE: str = ... RE: Pattern RE_SPACES: Any - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... def get_class_and_title(self, match): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/attr_list.pyi b/third_party/2and3/markdown/extensions/attr_list.pyi index 29c26afd2..d073b486a 100644 --- a/third_party/2and3/markdown/extensions/attr_list.pyi +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -12,11 +12,9 @@ class AttrListTreeprocessor(Treeprocessor): BLOCK_RE: Pattern INLINE_RE: Pattern NAME_RE: Pattern - def run(self, doc) -> None: ... def assign_attrs(self, elem, attrs) -> None: ... def sanitize_name(self, name): ... -class AttrListExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class AttrListExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi index 8b1eb461d..b13652b3b 100644 --- a/third_party/2and3/markdown/extensions/codehilite.pyi +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -35,11 +35,8 @@ class CodeHilite: class HiliteTreeprocessor(Treeprocessor): def code_unescape(self, text): ... - def run(self, root) -> None: ... class CodeHiliteExtension(Extension): - config: Any def __init__(self, **kwargs) -> None: ... - def extendMarkdown(self, md) -> None: ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/def_list.pyi b/third_party/2and3/markdown/extensions/def_list.pyi index 1aa70d29f..f1d61cccd 100644 --- a/third_party/2and3/markdown/extensions/def_list.pyi +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -6,15 +6,8 @@ from markdown.extensions import Extension class DefListProcessor(BlockProcessor): RE: Pattern NO_INDENT_RE: Pattern - def test(self, parent, block): ... - def run(self, parent, blocks): ... -class DefListIndentProcessor(ListIndentProcessor): - ITEM_TYPES: Any - LIST_TYPES: Any - def create_item(self, parent, block) -> None: ... - -class DefListExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class DefListIndentProcessor(ListIndentProcessor): ... +class DefListExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi index 4c658270c..8d761845c 100644 --- a/third_party/2and3/markdown/extensions/extra.pyi +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -5,8 +5,6 @@ from markdown.extensions import Extension extensions: Any class ExtraExtension(Extension): - config: Any def __init__(self, **kwargs) -> None: ... - def extendMarkdown(self, md) -> None: ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/fenced_code.pyi b/third_party/2and3/markdown/extensions/fenced_code.pyi index 9afedc4f2..3a216c432 100644 --- a/third_party/2and3/markdown/extensions/fenced_code.pyi +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -3,8 +3,7 @@ from typing import Any, Pattern from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -class FencedCodeExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class FencedCodeExtension(Extension): ... class FencedBlockPreprocessor(Preprocessor): FENCED_BLOCK_RE: Pattern @@ -13,6 +12,5 @@ class FencedBlockPreprocessor(Preprocessor): checked_for_codehilite: bool = ... codehilite_conf: Any def __init__(self, md) -> None: ... - def run(self, lines): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index 5e8e50d54..d4b2953d6 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -13,14 +13,12 @@ TABBED_RE: Pattern RE_REF_ID: Any class FootnoteExtension(Extension): - config: Any unique_prefix: int = ... found_refs: Any used_refs: Any def __init__(self, **kwargs) -> None: ... parser: Any md: Any - def extendMarkdown(self, md) -> None: ... footnotes: Any def reset(self) -> None: ... def unique_ref(self, reference, found: bool = ...): ... @@ -34,13 +32,11 @@ class FootnoteExtension(Extension): class FootnotePreprocessor(Preprocessor): footnotes: Any def __init__(self, footnotes) -> None: ... - def run(self, lines): ... def detectTabbed(self, lines): ... class FootnoteInlineProcessor(InlineProcessor): footnotes: Any def __init__(self, pattern, footnotes) -> None: ... - def handleMatch(self, m, data): ... # type: ignore class FootnotePostTreeprocessor(Treeprocessor): footnotes: Any @@ -49,16 +45,13 @@ class FootnotePostTreeprocessor(Treeprocessor): def get_num_duplicates(self, li): ... def handle_duplicates(self, parent) -> None: ... offset: int = ... - def run(self, root) -> None: ... class FootnoteTreeprocessor(Treeprocessor): footnotes: Any def __init__(self, footnotes) -> None: ... - def run(self, root) -> None: ... class FootnotePostprocessor(Postprocessor): footnotes: Any def __init__(self, footnotes) -> None: ... - def run(self, text): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/legacy_attrs.pyi b/third_party/2and3/markdown/extensions/legacy_attrs.pyi index ab76addaa..e5e1a9c11 100644 --- a/third_party/2and3/markdown/extensions/legacy_attrs.pyi +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -6,10 +6,8 @@ from markdown.treeprocessors import Treeprocessor ATTR_RE: Pattern class LegacyAttrs(Treeprocessor): - def run(self, doc) -> None: ... def handleAttributes(self, el, txt): ... -class LegacyAttrExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class LegacyAttrExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/legacy_em.pyi b/third_party/2and3/markdown/extensions/legacy_em.pyi index 55847cf9d..c1de142b4 100644 --- a/third_party/2and3/markdown/extensions/legacy_em.pyi +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -7,10 +7,7 @@ EMPHASIS_RE: str STRONG_RE: str STRONG_EM_RE: str -class LegacyUnderscoreProcessor(UnderscoreProcessor): - PATTERNS: Any - -class LegacyEmExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class LegacyUnderscoreProcessor(UnderscoreProcessor): ... +class LegacyEmExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/md_in_html.pyi b/third_party/2and3/markdown/extensions/md_in_html.pyi index 99f19773d..3991a94df 100644 --- a/third_party/2and3/markdown/extensions/md_in_html.pyi +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -3,11 +3,7 @@ from typing import Any, Optional from markdown.blockprocessors import BlockProcessor from markdown.extensions import Extension -class MarkdownInHtmlProcessor(BlockProcessor): - def test(self, parent, block): ... - def run(self, parent, blocks, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... - -class MarkdownInHtmlExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class MarkdownInHtmlProcessor(BlockProcessor): ... +class MarkdownInHtmlExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi index 5277a0347..dc5ac5b51 100644 --- a/third_party/2and3/markdown/extensions/meta.pyi +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -11,10 +11,8 @@ END_RE: Pattern class MetaExtension(Extension): md: Any - def extendMarkdown(self, md) -> None: ... def reset(self) -> None: ... -class MetaPreprocessor(Preprocessor): - def run(self, lines): ... +class MetaPreprocessor(Preprocessor): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi index ff8f6bf32..a569faba8 100644 --- a/third_party/2and3/markdown/extensions/nl2br.pyi +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -4,7 +4,6 @@ from markdown.extensions import Extension BR_RE: str -class Nl2BrExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class Nl2BrExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi index bf274bfba..2a9cc86d3 100644 --- a/third_party/2and3/markdown/extensions/sane_lists.pyi +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -4,17 +4,11 @@ from markdown.blockprocessors import OListProcessor, UListProcessor from markdown.extensions import Extension class SaneOListProcessor(OListProcessor): - SIBLING_TAGS: Any - LAZY_OL: bool = ... - CHILD_RE: Pattern def __init__(self, parser) -> None: ... class SaneUListProcessor(UListProcessor): - SIBLING_TAGS: Any - CHILD_RE: Pattern def __init__(self, parser) -> None: ... -class SaneListExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class SaneListExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index 3bbf0fde9..5ec9d30ef 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -25,14 +25,9 @@ HTML_STRICT_RE: str class SubstituteTextPattern(HtmlInlineProcessor): replace: Any - md: Any def __init__(self, pattern, replace, md) -> None: ... - @property - def markdown(self): ... - def handleMatch(self, m, data): ... # type: ignore class SmartyExtension(Extension): - config: Any substitutions: Any def __init__(self, **kwargs) -> None: ... def educateDashes(self, md) -> None: ... @@ -40,6 +35,5 @@ class SmartyExtension(Extension): def educateAngledQuotes(self, md) -> None: ... def educateQuotes(self, md) -> None: ... inlinePatterns: Any - def extendMarkdown(self, md) -> None: ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/tables.pyi b/third_party/2and3/markdown/extensions/tables.pyi index 700dfa0f8..2250cae7e 100644 --- a/third_party/2and3/markdown/extensions/tables.pyi +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -13,10 +13,7 @@ class TableProcessor(BlockProcessor): border: bool = ... separator: str = ... def __init__(self, parser) -> None: ... - def test(self, parent, block): ... - def run(self, parent, blocks) -> None: ... -class TableExtension(Extension): - def extendMarkdown(self, md) -> None: ... +class TableExtension(Extension): ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi index cf4e92ead..da6c9396d 100644 --- a/third_party/2and3/markdown/extensions/toc.pyi +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -34,14 +34,11 @@ class TocTreeprocessor(Treeprocessor): def add_anchor(self, c, elem_id) -> None: ... def add_permalink(self, c, elem_id) -> None: ... def build_toc_div(self, toc_list): ... - def run(self, doc) -> None: ... class TocExtension(Extension): TreeProcessorClass: Any - config: Any def __init__(self, **kwargs) -> None: ... md: Any - def extendMarkdown(self, md) -> None: ... def reset(self) -> None: ... def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi index 26cc954c9..044edb0e3 100644 --- a/third_party/2and3/markdown/extensions/wikilinks.pyi +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -6,14 +6,11 @@ from markdown.inlinepatterns import InlineProcessor def build_url(label, base, end): ... class WikiLinkExtension(Extension): - config: Any def __init__(self, **kwargs) -> None: ... md: Any - def extendMarkdown(self, md) -> None: ... class WikiLinksInlineProcessor(InlineProcessor): config: Any def __init__(self, pattern, config) -> None: ... - def handleMatch(self, m, data): ... # type: ignore def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi index a5095700a..70f469ac3 100644 --- a/third_party/2and3/markdown/inlinepatterns.pyi +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -1,4 +1,5 @@ -from typing import Any, Optional +from typing import Any, Match, Optional, Tuple, Union +from xml.etree.ElementTree import Element def build_inlinepatterns(md, **kwargs): ... @@ -39,58 +40,38 @@ class Pattern: @property def markdown(self): ... def getCompiledRegExp(self): ... - def handleMatch(self, m) -> None: ... + def handleMatch(self, m: Match) -> Optional[Union[str, Element]]: ... def type(self): ... def unescape(self, text): ... class InlineProcessor(Pattern): - pattern: Any - compiled_re: Any safe_mode: bool = ... - md: Any def __init__(self, pattern, md: Optional[Any] = ...) -> None: ... - def handleMatch(self, m, data) -> None: ... # type: ignore + def handleMatch(self, m: Match, data) -> Union[Tuple[Element, int, int], Tuple[None, None, None]]: ... # type: ignore -class SimpleTextPattern(Pattern): - def handleMatch(self, m): ... - -class SimpleTextInlineProcessor(InlineProcessor): - def handleMatch(self, m, data): ... # type: ignore - -class EscapeInlineProcessor(InlineProcessor): - def handleMatch(self, m, data): ... # type: ignore +class SimpleTextPattern(Pattern): ... +class SimpleTextInlineProcessor(InlineProcessor): ... +class EscapeInlineProcessor(InlineProcessor): ... class SimpleTagPattern(Pattern): tag: Any def __init__(self, pattern, tag) -> None: ... - def handleMatch(self, m): ... class SimpleTagInlineProcessor(InlineProcessor): tag: Any def __init__(self, pattern, tag) -> None: ... - def handleMatch(self, m, data): ... # type: ignore -class SubstituteTagPattern(SimpleTagPattern): - def handleMatch(self, m): ... - -class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m, data): ... # type: ignore +class SubstituteTagPattern(SimpleTagPattern): ... +class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): ... class BacktickInlineProcessor(InlineProcessor): ESCAPED_BSLASH: Any tag: str = ... def __init__(self, pattern) -> None: ... - def handleMatch(self, m, data): ... # type: ignore -class DoubleTagPattern(SimpleTagPattern): - def handleMatch(self, m): ... - -class DoubleTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m, data): ... # type: ignore - -class HtmlInlineProcessor(InlineProcessor): - def handleMatch(self, m, data): ... # type: ignore - def unescape(self, text): ... +class DoubleTagPattern(SimpleTagPattern): ... +class DoubleTagInlineProcessor(SimpleTagInlineProcessor): ... +class HtmlInlineProcessor(InlineProcessor): ... class AsteriskProcessor(InlineProcessor): PATTERNS: Any @@ -99,7 +80,6 @@ class AsteriskProcessor(InlineProcessor): def build_double2(self, m, tags, idx): ... def parse_sub_patterns(self, data, parent, last, idx) -> None: ... def build_element(self, m, builder, tags, index): ... - def handleMatch(self, m, data): ... # type: ignore class UnderscoreProcessor(AsteriskProcessor): PATTERNS: Any @@ -107,28 +87,17 @@ class UnderscoreProcessor(AsteriskProcessor): class LinkInlineProcessor(InlineProcessor): RE_LINK: Any RE_TITLE_CLEAN: Any - def handleMatch(self, m, data): ... # type: ignore def getLink(self, data, index): ... def getText(self, data, index): ... -class ImageInlineProcessor(LinkInlineProcessor): - def handleMatch(self, m, data): ... # type: ignore +class ImageInlineProcessor(LinkInlineProcessor): ... class ReferenceInlineProcessor(LinkInlineProcessor): NEWLINE_CLEANUP_RE: Pattern - RE_LINK: Any - def handleMatch(self, m, data): ... # type: ignore def evalId(self, data, index, text): ... def makeTag(self, href, title, text): ... -class ShortReferenceInlineProcessor(ReferenceInlineProcessor): - def evalId(self, data, index, text): ... - -class ImageReferenceInlineProcessor(ReferenceInlineProcessor): - def makeTag(self, href, title, text): ... - -class AutolinkInlineProcessor(InlineProcessor): - def handleMatch(self, m, data): ... # type: ignore - -class AutomailInlineProcessor(InlineProcessor): - def handleMatch(self, m, data): ... # type: ignore +class ShortReferenceInlineProcessor(ReferenceInlineProcessor): ... +class ImageReferenceInlineProcessor(ReferenceInlineProcessor): ... +class AutolinkInlineProcessor(InlineProcessor): ... +class AutomailInlineProcessor(InlineProcessor): ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi index a7ef53572..42cddc124 100644 --- a/third_party/2and3/markdown/postprocessors.pyi +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -8,13 +8,10 @@ class Postprocessor(util.Processor): def run(self, text) -> None: ... class RawHtmlPostprocessor(Postprocessor): - def run(self, text): ... def isblocklevel(self, html): ... -class AndSubstitutePostprocessor(Postprocessor): - def run(self, text): ... +class AndSubstitutePostprocessor(Postprocessor): ... class UnescapePostprocessor(Postprocessor): RE: Pattern def unescape(self, m): ... - def run(self, text): ... diff --git a/third_party/2and3/markdown/preprocessors.pyi b/third_party/2and3/markdown/preprocessors.pyi index e3083cdf5..b3ab45f55 100644 --- a/third_party/2and3/markdown/preprocessors.pyi +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -7,8 +7,7 @@ def build_preprocessors(md, **kwargs): ... class Preprocessor(util.Processor): def run(self, lines: List[str]) -> List[str]: ... -class NormalizeWhitespace(Preprocessor): - def run(self, lines: Iterable[str]) -> List[str]: ... +class NormalizeWhitespace(Preprocessor): ... class HtmlBlockPreprocessor(Preprocessor): right_tag_patterns: Any @@ -17,10 +16,8 @@ class HtmlBlockPreprocessor(Preprocessor): attrs_re: Any left_tag_re: Any markdown_in_raw: bool = ... - def run(self, lines: Iterable[str]) -> List[str]: ... class ReferencePreprocessor(Preprocessor): TITLE: str = ... RE: Pattern TITLE_RE: Pattern - def run(self, lines: List[str]) -> List[str]: ... diff --git a/third_party/2and3/markdown/treeprocessors.pyi b/third_party/2and3/markdown/treeprocessors.pyi index f05cd795c..a213600a6 100644 --- a/third_party/2and3/markdown/treeprocessors.pyi +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -9,15 +9,11 @@ class Treeprocessor(util.Processor): def run(self, root) -> None: ... class InlineProcessor(Treeprocessor): - md: Any inlinePatterns: Any ancestors: Any def __init__(self, md) -> None: ... - @property - def markdown(self): ... stashed_nodes: Any parent_map: Any def run(self, tree, ancestors: Optional[Any] = ...): ... -class PrettifyTreeprocessor(Treeprocessor): - def run(self, root) -> None: ... +class PrettifyTreeprocessor(Treeprocessor): ...