diff --git a/third_party/2and3/markdown/__meta__.pyi b/third_party/2and3/markdown/__meta__.pyi new file mode 100644 index 000000000000..4a5eacaf90cb --- /dev/null +++ b/third_party/2and3/markdown/__meta__.pyi @@ -0,0 +1,3 @@ +from typing import Any + +__version_info__: Any diff --git a/third_party/2and3/markdown/blockparser.pyi b/third_party/2and3/markdown/blockparser.pyi new file mode 100644 index 000000000000..602ecca0b504 --- /dev/null +++ b/third_party/2and3/markdown/blockparser.pyi @@ -0,0 +1,18 @@ +from typing import Any + +class State(list): + def set(self, state) -> None: ... + def reset(self) -> None: ... + def isstate(self, state): ... + +class BlockParser: + blockprocessors: Any + state: Any + md: Any + def __init__(self, md) -> None: ... + @property + def markdown(self): ... + root: Any + def parseDocument(self, lines): ... + def parseChunk(self, parent, text) -> None: ... + def parseBlocks(self, parent, blocks) -> None: ... diff --git a/third_party/2and3/markdown/blockprocessors.pyi b/third_party/2and3/markdown/blockprocessors.pyi new file mode 100644 index 000000000000..8c78bbe7b57e --- /dev/null +++ b/third_party/2and3/markdown/blockprocessors.pyi @@ -0,0 +1,78 @@ +from typing import Any, Pattern + +logger: Any + +def build_block_parser(md, **kwargs): ... + +class BlockProcessor: + parser: Any + tab_length: Any + def __init__(self, parser) -> None: ... + def lastChild(self, parent): ... + def detab(self, text): ... + def looseDetab(self, text, level: int = ...): ... + def test(self, parent, block) -> None: ... + def run(self, parent, blocks) -> None: ... + +class ListIndentProcessor(BlockProcessor): + ITEM_TYPES: Any + 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 BlockQuoteProcessor(BlockProcessor): + RE: Pattern + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... + def clean(self, line): ... + +class OListProcessor(BlockProcessor): + TAG: str = ... + STARTSWITH: str = ... + LAZY_OL: bool = ... + SIBLING_TAGS: Any + RE: Pattern + 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): + TAG: str = ... + RE: Pattern + def __init__(self, parser) -> None: ... + +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: ... diff --git a/third_party/2and3/markdown/extensions/__init__.pyi b/third_party/2and3/markdown/extensions/__init__.pyi index 13905d15032e..eedc24829dc5 100644 --- a/third_party/2and3/markdown/extensions/__init__.pyi +++ b/third_party/2and3/markdown/extensions/__init__.pyi @@ -1,6 +1,6 @@ from typing import Mapping, Sequence -from ..core import Markdown +from markdown.core import Markdown class Extension: config: Mapping[str, str] = ... diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi new file mode 100644 index 000000000000..3655f922311a --- /dev/null +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -0,0 +1,20 @@ +from typing import Any, Pattern + +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 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 new file mode 100644 index 000000000000..9b7ed3ee0622 --- /dev/null +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -0,0 +1,18 @@ +from typing import Any, Pattern + +from markdown.blockprocessors import BlockProcessor +from markdown.extensions import Extension + +class AdmonitionExtension(Extension): + def extendMarkdown(self, md) -> None: ... + +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 new file mode 100644 index 000000000000..29c26afd2a43 --- /dev/null +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -0,0 +1,22 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor + +def get_attrs(str): ... +def isheader(elem): ... + +class AttrListTreeprocessor(Treeprocessor): + BASE_RE: str = ... + HEADER_RE: Pattern + 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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi new file mode 100644 index 000000000000..8b1eb461d8a4 --- /dev/null +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -0,0 +1,45 @@ +from typing import Any, Optional + +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor + +pygments: bool + +def parse_hl_lines(expr): ... + +class CodeHilite: + src: Any + lang: Any + linenums: Any + guess_lang: Any + css_class: Any + style: Any + noclasses: Any + tab_length: Any + hl_lines: Any + use_pygments: Any + def __init__( + self, + src: Optional[Any] = ..., + linenums: Optional[Any] = ..., + guess_lang: bool = ..., + css_class: str = ..., + lang: Optional[Any] = ..., + style: str = ..., + noclasses: bool = ..., + tab_length: int = ..., + hl_lines: Optional[Any] = ..., + use_pygments: bool = ..., + ) -> None: ... + def hilite(self): ... + +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 new file mode 100644 index 000000000000..1aa70d29f4b2 --- /dev/null +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -0,0 +1,20 @@ +from typing import Any, Pattern + +from markdown.blockprocessors import BlockProcessor, ListIndentProcessor +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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi new file mode 100644 index 000000000000..4c658270ce6c --- /dev/null +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -0,0 +1,12 @@ +from typing import Any + +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 new file mode 100644 index 000000000000..9afedc4f2d08 --- /dev/null +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -0,0 +1,18 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.preprocessors import Preprocessor + +class FencedCodeExtension(Extension): + def extendMarkdown(self, md) -> None: ... + +class FencedBlockPreprocessor(Preprocessor): + FENCED_BLOCK_RE: Pattern + CODE_WRAP: str = ... + LANG_TAG: str = ... + 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 new file mode 100644 index 000000000000..5e8e50d54be3 --- /dev/null +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -0,0 +1,64 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.inlinepatterns import InlineProcessor +from markdown.postprocessors import Postprocessor +from markdown.preprocessors import Preprocessor +from markdown.treeprocessors import Treeprocessor + +FN_BACKLINK_TEXT: Any +NBSP_PLACEHOLDER: Any +DEF_RE: Pattern +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 = ...): ... + def findFootnotesPlaceholder(self, root): ... + def setFootnote(self, id, text) -> None: ... + def get_separator(self): ... + def makeFootnoteId(self, id): ... + def makeFootnoteRefId(self, id, found: bool = ...): ... + def makeFootnotesDiv(self, root): ... + +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 + def __init__(self, footnotes) -> None: ... + def add_duplicates(self, li, duplicates) -> None: ... + 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 new file mode 100644 index 000000000000..ab76addaa2ab --- /dev/null +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -0,0 +1,15 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/legacy_em.pyi b/third_party/2and3/markdown/extensions/legacy_em.pyi new file mode 100644 index 000000000000..55847cf9dcc3 --- /dev/null +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -0,0 +1,16 @@ +from typing import Any + +from markdown.extensions import Extension +from markdown.inlinepatterns import UnderscoreProcessor + +EMPHASIS_RE: str +STRONG_RE: str +STRONG_EM_RE: str + +class LegacyUnderscoreProcessor(UnderscoreProcessor): + PATTERNS: Any + +class LegacyEmExtension(Extension): + def extendMarkdown(self, md) -> None: ... + +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 new file mode 100644 index 000000000000..99f19773db53 --- /dev/null +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -0,0 +1,13 @@ +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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi new file mode 100644 index 000000000000..5277a0347e99 --- /dev/null +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -0,0 +1,20 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.preprocessors import Preprocessor + +log: Any +META_RE: Pattern +META_MORE_RE: Pattern +BEGIN_RE: Pattern +END_RE: Pattern + +class MetaExtension(Extension): + md: Any + def extendMarkdown(self, md) -> None: ... + def reset(self) -> None: ... + +class MetaPreprocessor(Preprocessor): + def run(self, lines): ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi new file mode 100644 index 000000000000..ff8f6bf3226b --- /dev/null +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -0,0 +1,10 @@ +from typing import Any + +from markdown.extensions import Extension + +BR_RE: str + +class Nl2BrExtension(Extension): + def extendMarkdown(self, md) -> None: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi new file mode 100644 index 000000000000..bf274bfba68f --- /dev/null +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -0,0 +1,20 @@ +from typing import Any, Pattern + +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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi new file mode 100644 index 000000000000..3bbf0fde998b --- /dev/null +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -0,0 +1,45 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.inlinepatterns import HtmlInlineProcessor + +punctClass: str +endOfWordClass: str +closeClass: str +openingQuotesBase: str +substitutions: Any +singleQuoteStartRe: Any +doubleQuoteStartRe: Any +doubleQuoteSetsRe: str +singleQuoteSetsRe: str +decadeAbbrRe: str +openingDoubleQuotesRegex: Any +closingDoubleQuotesRegex: str +closingDoubleQuotesRegex2: Any +openingSingleQuotesRegex: Any +closingSingleQuotesRegex: Any +closingSingleQuotesRegex2: Any +remainingSingleQuotesRegex: str +remainingDoubleQuotesRegex: str +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: ... + def educateEllipses(self, md) -> None: ... + 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 new file mode 100644 index 000000000000..700dfa0f8db7 --- /dev/null +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -0,0 +1,22 @@ +from typing import Any + +from markdown.blockprocessors import BlockProcessor +from markdown.extensions import Extension + +PIPE_NONE: int +PIPE_LEFT: int +PIPE_RIGHT: int + +class TableProcessor(BlockProcessor): + RE_CODE_PIPES: Any + RE_END_BORDER: Any + 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: ... + +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi new file mode 100644 index 000000000000..cf4e92eadd53 --- /dev/null +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -0,0 +1,47 @@ +from typing import Any, Pattern + +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor + +def slugify(value, separator): ... + +IDCOUNT_RE: Pattern + +def unique(id, ids): ... +def get_name(el): ... +def stashedHTML2text(text, md, strip_entities: bool = ...): ... +def unescape(text): ... +def nest_toc_tokens(toc_list): ... + +class TocTreeprocessor(Treeprocessor): + marker: Any + title: Any + base_level: Any + slugify: Any + sep: Any + use_anchors: Any + anchorlink_class: Any + use_permalinks: Any + permalink_class: Any + permalink_title: Any + header_rgx: Any + toc_top: int = ... + toc_bottom: Any + def __init__(self, md, config) -> None: ... + def iterparent(self, node) -> None: ... + def replace_marker(self, root, elem) -> None: ... + def set_level(self, elem) -> None: ... + 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 new file mode 100644 index 000000000000..26cc954c999f --- /dev/null +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -0,0 +1,19 @@ +from typing import Any + +from markdown.extensions import Extension +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 new file mode 100644 index 000000000000..a5095700a2de --- /dev/null +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -0,0 +1,134 @@ +from typing import Any, Optional + +def build_inlinepatterns(md, **kwargs): ... + +NOIMG: str +BACKTICK_RE: str +ESCAPE_RE: str +EMPHASIS_RE: str +STRONG_RE: str +SMART_STRONG_RE: str +SMART_EMPHASIS_RE: str +SMART_STRONG_EM_RE: str +EM_STRONG_RE: str +EM_STRONG2_RE: str +STRONG_EM_RE: str +STRONG_EM2_RE: str +STRONG_EM3_RE: str +LINK_RE: str +IMAGE_LINK_RE: str +REFERENCE_RE: str +IMAGE_REFERENCE_RE: str +NOT_STRONG_RE: str +AUTOLINK_RE: str +AUTOMAIL_RE: str +HTML_RE: str +ENTITY_RE: str +LINE_BREAK_RE: str + +def dequote(string): ... + +class EmStrongItem: ... + +class Pattern: + ANCESTOR_EXCLUDES: Any + pattern: Any + compiled_re: Any + md: Any + def __init__(self, pattern, md: Optional[Any] = ...) -> None: ... + @property + def markdown(self): ... + def getCompiledRegExp(self): ... + def handleMatch(self, m) -> None: ... + 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 + +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 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 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 AsteriskProcessor(InlineProcessor): + PATTERNS: Any + def build_single(self, m, tag, idx): ... + def build_double(self, m, tags, idx): ... + 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 + +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 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 diff --git a/third_party/2and3/markdown/pep562.pyi b/third_party/2and3/markdown/pep562.pyi new file mode 100644 index 000000000000..398bf66b8313 --- /dev/null +++ b/third_party/2and3/markdown/pep562.pyi @@ -0,0 +1,9 @@ +from typing import Any + +class Version: + def __new__(cls, major, minor, micro, release: str = ..., pre: int = ..., post: int = ..., dev: int = ...): ... + +class Pep562: + def __init__(self, name) -> None: ... + def __dir__(self): ... + def __getattr__(self, name): ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi new file mode 100644 index 000000000000..a7ef53572ecb --- /dev/null +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -0,0 +1,20 @@ +from typing import Any, Pattern + +from . import util + +def build_postprocessors(md, **kwargs): ... + +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 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 new file mode 100644 index 000000000000..c29b6ab59623 --- /dev/null +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -0,0 +1,26 @@ +from typing import Any, Pattern + +from . import util + +def build_preprocessors(md, **kwargs): ... + +class Preprocessor(util.Processor): + def run(self, lines) -> None: ... + +class NormalizeWhitespace(Preprocessor): + def run(self, lines): ... + +class HtmlBlockPreprocessor(Preprocessor): + right_tag_patterns: Any + attrs_pattern: str = ... + left_tag_pattern: Any + attrs_re: Any + left_tag_re: Any + markdown_in_raw: bool = ... + def run(self, lines): ... + +class ReferencePreprocessor(Preprocessor): + TITLE: str = ... + RE: Pattern + TITLE_RE: Pattern + def run(self, lines): ... diff --git a/third_party/2and3/markdown/serializers.pyi b/third_party/2and3/markdown/serializers.pyi new file mode 100644 index 000000000000..cdad4b1b613d --- /dev/null +++ b/third_party/2and3/markdown/serializers.pyi @@ -0,0 +1,4 @@ +from typing import Any + +def to_html_string(element): ... +def to_xhtml_string(element): ... diff --git a/third_party/2and3/markdown/treeprocessors.pyi b/third_party/2and3/markdown/treeprocessors.pyi new file mode 100644 index 000000000000..f05cd795c73f --- /dev/null +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -0,0 +1,23 @@ +from typing import Any, Optional + +from . import util + +def build_treeprocessors(md, **kwargs): ... +def isString(s): ... + +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: ... diff --git a/third_party/2and3/markdown/util.pyi b/third_party/2and3/markdown/util.pyi new file mode 100644 index 000000000000..170fadf43494 --- /dev/null +++ b/third_party/2and3/markdown/util.pyi @@ -0,0 +1,58 @@ +from collections import namedtuple +from typing import Any, Optional, Pattern + +PY37: Any +__deprecated__: Any +BLOCK_LEVEL_ELEMENTS: Any +STX: str +ETX: str +INLINE_PLACEHOLDER_PREFIX: Any +INLINE_PLACEHOLDER: Any +INLINE_PLACEHOLDER_RE: Pattern +AMP_SUBSTITUTE: Any +HTML_PLACEHOLDER: Any +HTML_PLACEHOLDER_RE: Pattern +TAG_PLACEHOLDER: Any +INSTALLED_EXTENSIONS: Any +RTL_BIDI_RANGES: Any + +def deprecated(message, stacklevel: int = ...): ... +def isBlockLevel(tag): ... +def parseBoolValue(value, fail_on_errors: bool = ..., preserve_none: bool = ...): ... +def code_escape(text): ... + +class AtomicString(str): ... + +class Processor: + md: Any + def __init__(self, md: Optional[Any] = ...) -> None: ... + @property + def markdown(self): ... + +class HtmlStash: + html_counter: int = ... + rawHtmlBlocks: Any + tag_counter: int = ... + tag_data: Any + def __init__(self) -> None: ... + def store(self, html): ... + def reset(self) -> None: ... + def get_placeholder(self, key): ... + def store_tag(self, tag, attrs, left_index, right_index): ... + +_PriorityItem = namedtuple("PriorityItem", ["name", "priority"]) + +class Registry: + def __init__(self) -> None: ... + def __contains__(self, item): ... + def __iter__(self) -> Any: ... + def __getitem__(self, key): ... + def __len__(self): ... + def get_index_for_name(self, name): ... + def register(self, item, name, priority) -> None: ... + def deregister(self, name, strict: bool = ...) -> None: ... + def __setitem__(self, key, value) -> None: ... + def __delitem__(self, key) -> None: ... + def add(self, key, value, location) -> None: ... + +def __getattr__(name): ...