From 89c3b4c7601567740a6a050a14e4c53706cda8ef Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Thu, 24 Sep 2020 23:59:38 -0700 Subject: [PATCH 1/7] stubgen output --- third_party/2and3/markdown/__meta__.pyi | 3 + third_party/2and3/markdown/blockparser.pyi | 18 +++ .../2and3/markdown/blockprocessors.pyi | 78 ++++++++++ .../2and3/markdown/extensions/abbr.pyi | 19 +++ .../2and3/markdown/extensions/admonition.pyi | 17 +++ .../2and3/markdown/extensions/attr_list.pyi | 21 +++ .../2and3/markdown/extensions/codehilite.pyi | 32 +++++ .../2and3/markdown/extensions/def_list.pyi | 19 +++ .../2and3/markdown/extensions/extra.pyi | 11 ++ .../2and3/markdown/extensions/fenced_code.pyi | 17 +++ .../2and3/markdown/extensions/footnotes.pyi | 63 ++++++++ .../markdown/extensions/legacy_attrs.pyi | 14 ++ .../2and3/markdown/extensions/legacy_em.pyi | 15 ++ .../2and3/markdown/extensions/md_in_html.pyi | 12 ++ .../2and3/markdown/extensions/meta.pyi | 19 +++ .../2and3/markdown/extensions/nl2br.pyi | 9 ++ .../2and3/markdown/extensions/sane_lists.pyi | 19 +++ .../2and3/markdown/extensions/smarty.pyi | 44 ++++++ .../2and3/markdown/extensions/tables.pyi | 21 +++ third_party/2and3/markdown/extensions/toc.pyi | 46 ++++++ .../2and3/markdown/extensions/wikilinks.pyi | 18 +++ third_party/2and3/markdown/inlinepatterns.pyi | 134 ++++++++++++++++++ third_party/2and3/markdown/pep562.pyi | 9 ++ third_party/2and3/markdown/postprocessors.pyi | 19 +++ third_party/2and3/markdown/preprocessors.pyi | 25 ++++ third_party/2and3/markdown/serializers.pyi | 4 + third_party/2and3/markdown/treeprocessors.pyi | 22 +++ third_party/2and3/markdown/util.pyi | 58 ++++++++ 28 files changed, 786 insertions(+) create mode 100644 third_party/2and3/markdown/__meta__.pyi create mode 100644 third_party/2and3/markdown/blockparser.pyi create mode 100644 third_party/2and3/markdown/blockprocessors.pyi create mode 100644 third_party/2and3/markdown/extensions/abbr.pyi create mode 100644 third_party/2and3/markdown/extensions/admonition.pyi create mode 100644 third_party/2and3/markdown/extensions/attr_list.pyi create mode 100644 third_party/2and3/markdown/extensions/codehilite.pyi create mode 100644 third_party/2and3/markdown/extensions/def_list.pyi create mode 100644 third_party/2and3/markdown/extensions/extra.pyi create mode 100644 third_party/2and3/markdown/extensions/fenced_code.pyi create mode 100644 third_party/2and3/markdown/extensions/footnotes.pyi create mode 100644 third_party/2and3/markdown/extensions/legacy_attrs.pyi create mode 100644 third_party/2and3/markdown/extensions/legacy_em.pyi create mode 100644 third_party/2and3/markdown/extensions/md_in_html.pyi create mode 100644 third_party/2and3/markdown/extensions/meta.pyi create mode 100644 third_party/2and3/markdown/extensions/nl2br.pyi create mode 100644 third_party/2and3/markdown/extensions/sane_lists.pyi create mode 100644 third_party/2and3/markdown/extensions/smarty.pyi create mode 100644 third_party/2and3/markdown/extensions/tables.pyi create mode 100644 third_party/2and3/markdown/extensions/toc.pyi create mode 100644 third_party/2and3/markdown/extensions/wikilinks.pyi create mode 100644 third_party/2and3/markdown/inlinepatterns.pyi create mode 100644 third_party/2and3/markdown/pep562.pyi create mode 100644 third_party/2and3/markdown/postprocessors.pyi create mode 100644 third_party/2and3/markdown/preprocessors.pyi create mode 100644 third_party/2and3/markdown/serializers.pyi create mode 100644 third_party/2and3/markdown/treeprocessors.pyi create mode 100644 third_party/2and3/markdown/util.pyi 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..b820eb9d435d --- /dev/null +++ b/third_party/2and3/markdown/blockparser.pyi @@ -0,0 +1,18 @@ +from typing import Any + +class State(list): + def set(self, state: Any) -> None: ... + def reset(self) -> None: ... + def isstate(self, state: Any): ... + +class BlockParser: + blockprocessors: Any = ... + state: Any = ... + md: Any = ... + def __init__(self, md: Any) -> None: ... + @property + def markdown(self): ... + root: Any = ... + def parseDocument(self, lines: Any): ... + def parseChunk(self, parent: Any, text: Any) -> None: ... + def parseBlocks(self, parent: Any, blocks: Any) -> None: ... diff --git a/third_party/2and3/markdown/blockprocessors.pyi b/third_party/2and3/markdown/blockprocessors.pyi new file mode 100644 index 000000000000..9a2a75abfc61 --- /dev/null +++ b/third_party/2and3/markdown/blockprocessors.pyi @@ -0,0 +1,78 @@ +from typing import Any + +logger: Any + +def build_block_parser(md: Any, **kwargs: Any): ... + +class BlockProcessor: + parser: Any = ... + tab_length: Any = ... + def __init__(self, parser: Any) -> None: ... + def lastChild(self, parent: Any): ... + def detab(self, text: Any): ... + def looseDetab(self, text: Any, level: int = ...): ... + def test(self, parent: Any, block: Any) -> None: ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class ListIndentProcessor(BlockProcessor): + ITEM_TYPES: Any = ... + LIST_TYPES: Any = ... + INDENT_RE: Any = ... + def __init__(self, *args: Any) -> None: ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + def create_item(self, parent: Any, block: Any) -> None: ... + def get_level(self, parent: Any, block: Any): ... + +class CodeBlockProcessor(BlockProcessor): + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class BlockQuoteProcessor(BlockProcessor): + RE: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + def clean(self, line: Any): ... + +class OListProcessor(BlockProcessor): + TAG: str = ... + STARTSWITH: str = ... + LAZY_OL: bool = ... + SIBLING_TAGS: Any = ... + RE: Any = ... + CHILD_RE: Any = ... + INDENT_RE: Any = ... + def __init__(self, parser: Any) -> None: ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + def get_items(self, block: Any): ... + +class UListProcessor(OListProcessor): + TAG: str = ... + RE: Any = ... + def __init__(self, parser: Any) -> None: ... + +class HashHeaderProcessor(BlockProcessor): + RE: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class SetextHeaderProcessor(BlockProcessor): + RE: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class HRProcessor(BlockProcessor): + RE: str = ... + SEARCH_RE: Any = ... + match: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class EmptyBlockProcessor(BlockProcessor): + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class ParagraphProcessor(BlockProcessor): + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi new file mode 100644 index 000000000000..bed9f32ee952 --- /dev/null +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -0,0 +1,19 @@ +from . import Extension +from ..inlinepatterns import InlineProcessor +from ..preprocessors import Preprocessor +from typing import Any + +ABBR_REF_RE: Any + +class AbbrExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +class AbbrPreprocessor(Preprocessor): + def run(self, lines: Any): ... + +class AbbrInlineProcessor(InlineProcessor): + title: Any = ... + def __init__(self, pattern: Any, title: Any) -> None: ... + def handleMatch(self, m: Any, data: Any): ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi new file mode 100644 index 000000000000..20a0b8ecc30d --- /dev/null +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -0,0 +1,17 @@ +from . import Extension +from ..blockprocessors import BlockProcessor +from typing import Any + +class AdmonitionExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +class AdmonitionProcessor(BlockProcessor): + CLASSNAME: str = ... + CLASSNAME_TITLE: str = ... + RE: Any = ... + RE_SPACES: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + def get_class_and_title(self, match: Any): ... + +def makeExtension(**kwargs: Any): ... 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..72d33db33391 --- /dev/null +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -0,0 +1,21 @@ +from . import Extension +from ..treeprocessors import Treeprocessor +from typing import Any + +def get_attrs(str: Any): ... +def isheader(elem: Any): ... + +class AttrListTreeprocessor(Treeprocessor): + BASE_RE: str = ... + HEADER_RE: Any = ... + BLOCK_RE: Any = ... + INLINE_RE: Any = ... + NAME_RE: Any = ... + def run(self, doc: Any) -> None: ... + def assign_attrs(self, elem: Any, attrs: Any) -> None: ... + def sanitize_name(self, name: Any): ... + +class AttrListExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi new file mode 100644 index 000000000000..25a85c2fba6b --- /dev/null +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -0,0 +1,32 @@ +from . import Extension +from ..treeprocessors import Treeprocessor +from typing import Any, Optional + +pygments: bool + +def parse_hl_lines(expr: Any): ... + +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: Any): ... + def run(self, root: Any) -> None: ... + +class CodeHiliteExtension(Extension): + config: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... 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..a04c1de3db11 --- /dev/null +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -0,0 +1,19 @@ +from . import Extension +from ..blockprocessors import BlockProcessor, ListIndentProcessor +from typing import Any + +class DefListProcessor(BlockProcessor): + RE: Any = ... + NO_INDENT_RE: Any = ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any): ... + +class DefListIndentProcessor(ListIndentProcessor): + ITEM_TYPES: Any = ... + LIST_TYPES: Any = ... + def create_item(self, parent: Any, block: Any) -> None: ... + +class DefListExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi new file mode 100644 index 000000000000..426f5515537a --- /dev/null +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -0,0 +1,11 @@ +from . import Extension +from typing import Any + +extensions: Any + +class ExtraExtension(Extension): + config: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... 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..88e21c31d92b --- /dev/null +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -0,0 +1,17 @@ +from . import Extension +from ..preprocessors import Preprocessor +from typing import Any + +class FencedCodeExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +class FencedBlockPreprocessor(Preprocessor): + FENCED_BLOCK_RE: Any = ... + CODE_WRAP: str = ... + LANG_TAG: str = ... + checked_for_codehilite: bool = ... + codehilite_conf: Any = ... + def __init__(self, md: Any) -> None: ... + def run(self, lines: Any): ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi new file mode 100644 index 000000000000..01ee770c57fb --- /dev/null +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -0,0 +1,63 @@ +from . import Extension +from ..inlinepatterns import InlineProcessor +from ..postprocessors import Postprocessor +from ..preprocessors import Preprocessor +from ..treeprocessors import Treeprocessor +from typing import Any + +FN_BACKLINK_TEXT: Any +NBSP_PLACEHOLDER: Any +DEF_RE: Any +TABBED_RE: Any +RE_REF_ID: Any + +class FootnoteExtension(Extension): + config: Any = ... + unique_prefix: int = ... + found_refs: Any = ... + used_refs: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + parser: Any = ... + md: Any = ... + def extendMarkdown(self, md: Any) -> None: ... + footnotes: Any = ... + def reset(self) -> None: ... + def unique_ref(self, reference: Any, found: bool = ...): ... + def findFootnotesPlaceholder(self, root: Any): ... + def setFootnote(self, id: Any, text: Any) -> None: ... + def get_separator(self): ... + def makeFootnoteId(self, id: Any): ... + def makeFootnoteRefId(self, id: Any, found: bool = ...): ... + def makeFootnotesDiv(self, root: Any): ... + +class FootnotePreprocessor(Preprocessor): + footnotes: Any = ... + def __init__(self, footnotes: Any) -> None: ... + def run(self, lines: Any): ... + def detectTabbed(self, lines: Any): ... + +class FootnoteInlineProcessor(InlineProcessor): + footnotes: Any = ... + def __init__(self, pattern: Any, footnotes: Any) -> None: ... + def handleMatch(self, m: Any, data: Any): ... + +class FootnotePostTreeprocessor(Treeprocessor): + footnotes: Any = ... + def __init__(self, footnotes: Any) -> None: ... + def add_duplicates(self, li: Any, duplicates: Any) -> None: ... + def get_num_duplicates(self, li: Any): ... + def handle_duplicates(self, parent: Any) -> None: ... + offset: int = ... + def run(self, root: Any) -> None: ... + +class FootnoteTreeprocessor(Treeprocessor): + footnotes: Any = ... + def __init__(self, footnotes: Any) -> None: ... + def run(self, root: Any) -> None: ... + +class FootnotePostprocessor(Postprocessor): + footnotes: Any = ... + def __init__(self, footnotes: Any) -> None: ... + def run(self, text: Any): ... + +def makeExtension(**kwargs: Any): ... 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..08d0535ab1b9 --- /dev/null +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -0,0 +1,14 @@ +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor +from typing import Any + +ATTR_RE: Any + +class LegacyAttrs(Treeprocessor): + def run(self, doc: Any) -> None: ... + def handleAttributes(self, el: Any, txt: Any): ... + +class LegacyAttrExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... 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..33f857067d56 --- /dev/null +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -0,0 +1,15 @@ +from . import Extension +from ..inlinepatterns import UnderscoreProcessor +from typing import Any + +EMPHASIS_RE: str +STRONG_RE: str +STRONG_EM_RE: str + +class LegacyUnderscoreProcessor(UnderscoreProcessor): + PATTERNS: Any = ... + +class LegacyEmExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... 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..02dab4986f7c --- /dev/null +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -0,0 +1,12 @@ +from . import Extension +from ..blockprocessors import BlockProcessor +from typing import Any, Optional + +class MarkdownInHtmlProcessor(BlockProcessor): + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... + +class MarkdownInHtmlExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi new file mode 100644 index 000000000000..115099702488 --- /dev/null +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -0,0 +1,19 @@ +from . import Extension +from ..preprocessors import Preprocessor +from typing import Any + +log: Any +META_RE: Any +META_MORE_RE: Any +BEGIN_RE: Any +END_RE: Any + +class MetaExtension(Extension): + md: Any = ... + def extendMarkdown(self, md: Any) -> None: ... + def reset(self) -> None: ... + +class MetaPreprocessor(Preprocessor): + def run(self, lines: Any): ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi new file mode 100644 index 000000000000..f05307a3baed --- /dev/null +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -0,0 +1,9 @@ +from . import Extension +from typing import Any + +BR_RE: str + +class Nl2BrExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... 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..8e3a9aec1552 --- /dev/null +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -0,0 +1,19 @@ +from . import Extension +from ..blockprocessors import OListProcessor, UListProcessor +from typing import Any + +class SaneOListProcessor(OListProcessor): + SIBLING_TAGS: Any = ... + LAZY_OL: bool = ... + CHILD_RE: Any = ... + def __init__(self, parser: Any) -> None: ... + +class SaneUListProcessor(UListProcessor): + SIBLING_TAGS: Any = ... + CHILD_RE: Any = ... + def __init__(self, parser: Any) -> None: ... + +class SaneListExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi new file mode 100644 index 000000000000..d1612ffb24a2 --- /dev/null +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -0,0 +1,44 @@ +from . import Extension +from ..inlinepatterns import HtmlInlineProcessor +from typing import Any + +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: Any + +class SubstituteTextPattern(HtmlInlineProcessor): + replace: Any = ... + md: Any = ... + def __init__(self, pattern: Any, replace: Any, md: Any) -> None: ... + @property + def markdown(self): ... + def handleMatch(self, m: Any, data: Any): ... + +class SmartyExtension(Extension): + config: Any = ... + substitutions: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + def educateDashes(self, md: Any) -> None: ... + def educateEllipses(self, md: Any) -> None: ... + def educateAngledQuotes(self, md: Any) -> None: ... + def educateQuotes(self, md: Any) -> None: ... + inlinePatterns: Any = ... + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/tables.pyi b/third_party/2and3/markdown/extensions/tables.pyi new file mode 100644 index 000000000000..2b4e8ef9b13f --- /dev/null +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -0,0 +1,21 @@ +from . import Extension +from ..blockprocessors import BlockProcessor +from typing import Any + +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: Any) -> None: ... + def test(self, parent: Any, block: Any): ... + def run(self, parent: Any, blocks: Any) -> None: ... + +class TableExtension(Extension): + def extendMarkdown(self, md: Any) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi new file mode 100644 index 000000000000..abca9d164e8f --- /dev/null +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -0,0 +1,46 @@ +from . import Extension +from ..treeprocessors import Treeprocessor +from typing import Any + +def slugify(value: Any, separator: Any): ... + +IDCOUNT_RE: Any + +def unique(id: Any, ids: Any): ... +def get_name(el: Any): ... +def stashedHTML2text(text: Any, md: Any, strip_entities: bool = ...): ... +def unescape(text: Any): ... +def nest_toc_tokens(toc_list: Any): ... + +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: Any, config: Any) -> None: ... + def iterparent(self, node: Any) -> None: ... + def replace_marker(self, root: Any, elem: Any) -> None: ... + def set_level(self, elem: Any) -> None: ... + def add_anchor(self, c: Any, elem_id: Any) -> None: ... + def add_permalink(self, c: Any, elem_id: Any) -> None: ... + def build_toc_div(self, toc_list: Any): ... + def run(self, doc: Any) -> None: ... + +class TocExtension(Extension): + TreeProcessorClass: Any = ... + config: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + md: Any = ... + def extendMarkdown(self, md: Any) -> None: ... + def reset(self) -> None: ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi new file mode 100644 index 000000000000..454360fb6341 --- /dev/null +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -0,0 +1,18 @@ +from . import Extension +from ..inlinepatterns import InlineProcessor +from typing import Any + +def build_url(label: Any, base: Any, end: Any): ... + +class WikiLinkExtension(Extension): + config: Any = ... + def __init__(self, **kwargs: Any) -> None: ... + md: Any = ... + def extendMarkdown(self, md: Any) -> None: ... + +class WikiLinksInlineProcessor(InlineProcessor): + config: Any = ... + def __init__(self, pattern: Any, config: Any) -> None: ... + def handleMatch(self, m: Any, data: Any): ... + +def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi new file mode 100644 index 000000000000..8863e3255952 --- /dev/null +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -0,0 +1,134 @@ +from typing import Any, Optional + +def build_inlinepatterns(md: Any, **kwargs: Any): ... + +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: Any +IMAGE_LINK_RE: str +REFERENCE_RE = LINK_RE +IMAGE_REFERENCE_RE = IMAGE_LINK_RE +NOT_STRONG_RE: str +AUTOLINK_RE: str +AUTOMAIL_RE: str +HTML_RE: str +ENTITY_RE: str +LINE_BREAK_RE: str + +def dequote(string: Any): ... + +class EmStrongItem: ... + +class Pattern: + ANCESTOR_EXCLUDES: Any = ... + pattern: Any = ... + compiled_re: Any = ... + md: Any = ... + def __init__(self, pattern: Any, md: Optional[Any] = ...) -> None: ... + @property + def markdown(self): ... + def getCompiledRegExp(self): ... + def handleMatch(self, m: Any) -> None: ... + def type(self): ... + def unescape(self, text: Any): ... + +class InlineProcessor(Pattern): + pattern: Any = ... + compiled_re: Any = ... + safe_mode: bool = ... + md: Any = ... + def __init__(self, pattern: Any, md: Optional[Any] = ...) -> None: ... + def handleMatch(self, m: Any, data: Any) -> None: ... + +class SimpleTextPattern(Pattern): + def handleMatch(self, m: Any): ... + +class SimpleTextInlineProcessor(InlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class EscapeInlineProcessor(InlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class SimpleTagPattern(Pattern): + tag: Any = ... + def __init__(self, pattern: Any, tag: Any) -> None: ... + def handleMatch(self, m: Any): ... + +class SimpleTagInlineProcessor(InlineProcessor): + tag: Any = ... + def __init__(self, pattern: Any, tag: Any) -> None: ... + def handleMatch(self, m: Any, data: Any): ... + +class SubstituteTagPattern(SimpleTagPattern): + def handleMatch(self, m: Any): ... + +class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class BacktickInlineProcessor(InlineProcessor): + ESCAPED_BSLASH: Any = ... + tag: str = ... + def __init__(self, pattern: Any) -> None: ... + def handleMatch(self, m: Any, data: Any): ... + +class DoubleTagPattern(SimpleTagPattern): + def handleMatch(self, m: Any): ... + +class DoubleTagInlineProcessor(SimpleTagInlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class HtmlInlineProcessor(InlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + def unescape(self, text: Any): ... + +class AsteriskProcessor(InlineProcessor): + PATTERNS: Any = ... + def build_single(self, m: Any, tag: Any, idx: Any): ... + def build_double(self, m: Any, tags: Any, idx: Any): ... + def build_double2(self, m: Any, tags: Any, idx: Any): ... + def parse_sub_patterns(self, data: Any, parent: Any, last: Any, idx: Any) -> None: ... + def build_element(self, m: Any, builder: Any, tags: Any, index: Any): ... + def handleMatch(self, m: Any, data: Any): ... + +class UnderscoreProcessor(AsteriskProcessor): + PATTERNS: Any = ... + +class LinkInlineProcessor(InlineProcessor): + RE_LINK: Any = ... + RE_TITLE_CLEAN: Any = ... + def handleMatch(self, m: Any, data: Any): ... + def getLink(self, data: Any, index: Any): ... + def getText(self, data: Any, index: Any): ... + +class ImageInlineProcessor(LinkInlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class ReferenceInlineProcessor(LinkInlineProcessor): + NEWLINE_CLEANUP_RE: Any = ... + RE_LINK: Any = ... + def handleMatch(self, m: Any, data: Any): ... + def evalId(self, data: Any, index: Any, text: Any): ... + def makeTag(self, href: Any, title: Any, text: Any): ... + +class ShortReferenceInlineProcessor(ReferenceInlineProcessor): + def evalId(self, data: Any, index: Any, text: Any): ... + +class ImageReferenceInlineProcessor(ReferenceInlineProcessor): + def makeTag(self, href: Any, title: Any, text: Any): ... + +class AutolinkInlineProcessor(InlineProcessor): + def handleMatch(self, m: Any, data: Any): ... + +class AutomailInlineProcessor(InlineProcessor): + def handleMatch(self, m: Any, data: Any): ... diff --git a/third_party/2and3/markdown/pep562.pyi b/third_party/2and3/markdown/pep562.pyi new file mode 100644 index 000000000000..76a328807b7b --- /dev/null +++ b/third_party/2and3/markdown/pep562.pyi @@ -0,0 +1,9 @@ +from typing import Any + +class Version: + def __new__(cls, major: Any, minor: Any, micro: Any, release: str = ..., pre: int = ..., post: int = ..., dev: int = ...): ... + +class Pep562: + def __init__(self, name: Any) -> None: ... + def __dir__(self): ... + def __getattr__(self, name: Any): ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi new file mode 100644 index 000000000000..69051ef0d6ba --- /dev/null +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -0,0 +1,19 @@ +from . import util +from typing import Any + +def build_postprocessors(md: Any, **kwargs: Any): ... + +class Postprocessor(util.Processor): + def run(self, text: Any) -> None: ... + +class RawHtmlPostprocessor(Postprocessor): + def run(self, text: Any): ... + def isblocklevel(self, html: Any): ... + +class AndSubstitutePostprocessor(Postprocessor): + def run(self, text: Any): ... + +class UnescapePostprocessor(Postprocessor): + RE: Any = ... + def unescape(self, m: Any): ... + def run(self, text: Any): ... diff --git a/third_party/2and3/markdown/preprocessors.pyi b/third_party/2and3/markdown/preprocessors.pyi new file mode 100644 index 000000000000..ef103f658fe3 --- /dev/null +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -0,0 +1,25 @@ +from . import util +from typing import Any + +def build_preprocessors(md: Any, **kwargs: Any): ... + +class Preprocessor(util.Processor): + def run(self, lines: Any) -> None: ... + +class NormalizeWhitespace(Preprocessor): + def run(self, lines: Any): ... + +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: Any): ... + +class ReferencePreprocessor(Preprocessor): + TITLE: str = ... + RE: Any = ... + TITLE_RE: Any = ... + def run(self, lines: Any): ... diff --git a/third_party/2and3/markdown/serializers.pyi b/third_party/2and3/markdown/serializers.pyi new file mode 100644 index 000000000000..9ad4248947db --- /dev/null +++ b/third_party/2and3/markdown/serializers.pyi @@ -0,0 +1,4 @@ +from typing import Any + +def to_html_string(element: Any): ... +def to_xhtml_string(element: Any): ... diff --git a/third_party/2and3/markdown/treeprocessors.pyi b/third_party/2and3/markdown/treeprocessors.pyi new file mode 100644 index 000000000000..02db04b7ccfa --- /dev/null +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -0,0 +1,22 @@ +from . import util +from typing import Any, Optional + +def build_treeprocessors(md: Any, **kwargs: Any): ... +def isString(s: Any): ... + +class Treeprocessor(util.Processor): + def run(self, root: Any) -> None: ... + +class InlineProcessor(Treeprocessor): + md: Any = ... + inlinePatterns: Any = ... + ancestors: Any = ... + def __init__(self, md: Any) -> None: ... + @property + def markdown(self): ... + stashed_nodes: Any = ... + parent_map: Any = ... + def run(self, tree: Any, ancestors: Optional[Any] = ...): ... + +class PrettifyTreeprocessor(Treeprocessor): + def run(self, root: Any) -> None: ... diff --git a/third_party/2and3/markdown/util.pyi b/third_party/2and3/markdown/util.pyi new file mode 100644 index 000000000000..b2e9902d3a8e --- /dev/null +++ b/third_party/2and3/markdown/util.pyi @@ -0,0 +1,58 @@ +from collections import namedtuple +from typing import Any, Optional + +PY37: Any +__deprecated__: Any +BLOCK_LEVEL_ELEMENTS: Any +STX: str +ETX: str +INLINE_PLACEHOLDER_PREFIX: Any +INLINE_PLACEHOLDER: Any +INLINE_PLACEHOLDER_RE: Any +AMP_SUBSTITUTE: Any +HTML_PLACEHOLDER: Any +HTML_PLACEHOLDER_RE: Any +TAG_PLACEHOLDER: Any +INSTALLED_EXTENSIONS: Any +RTL_BIDI_RANGES: Any + +def deprecated(message: Any, stacklevel: int = ...): ... +def isBlockLevel(tag: Any): ... +def parseBoolValue(value: Any, fail_on_errors: bool = ..., preserve_none: bool = ...): ... +def code_escape(text: Any): ... + +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: Any): ... + def reset(self) -> None: ... + def get_placeholder(self, key: Any): ... + def store_tag(self, tag: Any, attrs: Any, left_index: Any, right_index: Any): ... + +_PriorityItem = namedtuple('PriorityItem', ['name', 'priority']) + +class Registry: + def __init__(self) -> None: ... + def __contains__(self, item: Any): ... + def __iter__(self) -> Any: ... + def __getitem__(self, key: Any): ... + def __len__(self): ... + def get_index_for_name(self, name: Any): ... + def register(self, item: Any, name: Any, priority: Any) -> None: ... + def deregister(self, name: Any, strict: bool = ...) -> None: ... + def __setitem__(self, key: Any, value: Any) -> None: ... + def __delitem__(self, key: Any) -> None: ... + def add(self, key: Any, value: Any, location: Any) -> None: ... + +def __getattr__(name: Any): ... From 322c17fc3508d828461cb600d0d24bebadda63f7 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Thu, 24 Sep 2020 23:59:48 -0700 Subject: [PATCH 2/7] type ignores --- .../2and3/markdown/extensions/abbr.pyi | 2 +- .../2and3/markdown/extensions/footnotes.pyi | 2 +- .../2and3/markdown/extensions/smarty.pyi | 2 +- .../2and3/markdown/extensions/wikilinks.pyi | 2 +- third_party/2and3/markdown/inlinepatterns.pyi | 28 +++++++++---------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi index bed9f32ee952..1860b6963495 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -14,6 +14,6 @@ class AbbrPreprocessor(Preprocessor): class AbbrInlineProcessor(InlineProcessor): title: Any = ... def __init__(self, pattern: Any, title: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index 01ee770c57fb..236a46d8cfd0 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -39,7 +39,7 @@ class FootnotePreprocessor(Preprocessor): class FootnoteInlineProcessor(InlineProcessor): footnotes: Any = ... def __init__(self, pattern: Any, footnotes: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class FootnotePostTreeprocessor(Treeprocessor): footnotes: Any = ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index d1612ffb24a2..e1603e3ca3cf 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -28,7 +28,7 @@ class SubstituteTextPattern(HtmlInlineProcessor): def __init__(self, pattern: Any, replace: Any, md: Any) -> None: ... @property def markdown(self): ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class SmartyExtension(Extension): config: Any = ... diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi index 454360fb6341..2f42f27513d5 100644 --- a/third_party/2and3/markdown/extensions/wikilinks.pyi +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -13,6 +13,6 @@ class WikiLinkExtension(Extension): class WikiLinksInlineProcessor(InlineProcessor): config: Any = ... def __init__(self, pattern: Any, config: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore def makeExtension(**kwargs: Any): ... diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi index 8863e3255952..55f3b1ee736c 100644 --- a/third_party/2and3/markdown/inlinepatterns.pyi +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -49,16 +49,16 @@ class InlineProcessor(Pattern): safe_mode: bool = ... md: Any = ... def __init__(self, pattern: Any, md: Optional[Any] = ...) -> None: ... - def handleMatch(self, m: Any, data: Any) -> None: ... + def handleMatch(self, m: Any, data: Any) -> None: ... # type: ignore class SimpleTextPattern(Pattern): def handleMatch(self, m: Any): ... class SimpleTextInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class EscapeInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class SimpleTagPattern(Pattern): tag: Any = ... @@ -68,28 +68,28 @@ class SimpleTagPattern(Pattern): class SimpleTagInlineProcessor(InlineProcessor): tag: Any = ... def __init__(self, pattern: Any, tag: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class SubstituteTagPattern(SimpleTagPattern): def handleMatch(self, m: Any): ... class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class BacktickInlineProcessor(InlineProcessor): ESCAPED_BSLASH: Any = ... tag: str = ... def __init__(self, pattern: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class DoubleTagPattern(SimpleTagPattern): def handleMatch(self, m: Any): ... class DoubleTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class HtmlInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore def unescape(self, text: Any): ... class AsteriskProcessor(InlineProcessor): @@ -99,7 +99,7 @@ class AsteriskProcessor(InlineProcessor): def build_double2(self, m: Any, tags: Any, idx: Any): ... def parse_sub_patterns(self, data: Any, parent: Any, last: Any, idx: Any) -> None: ... def build_element(self, m: Any, builder: Any, tags: Any, index: Any): ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class UnderscoreProcessor(AsteriskProcessor): PATTERNS: Any = ... @@ -107,17 +107,17 @@ class UnderscoreProcessor(AsteriskProcessor): class LinkInlineProcessor(InlineProcessor): RE_LINK: Any = ... RE_TITLE_CLEAN: Any = ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore def getLink(self, data: Any, index: Any): ... def getText(self, data: Any, index: Any): ... class ImageInlineProcessor(LinkInlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class ReferenceInlineProcessor(LinkInlineProcessor): NEWLINE_CLEANUP_RE: Any = ... RE_LINK: Any = ... - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore def evalId(self, data: Any, index: Any, text: Any): ... def makeTag(self, href: Any, title: Any, text: Any): ... @@ -128,7 +128,7 @@ class ImageReferenceInlineProcessor(ReferenceInlineProcessor): def makeTag(self, href: Any, title: Any, text: Any): ... class AutolinkInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore class AutomailInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... + def handleMatch(self, m: Any, data: Any): ... # type: ignore From 59bddf190c9c2c297ed70b3883ef6e7d02a5a5a9 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 25 Sep 2020 00:13:11 -0700 Subject: [PATCH 3/7] remove explicit Any This makes intention clearer --- third_party/2and3/markdown/blockparser.pyi | 20 +-- .../2and3/markdown/blockprocessors.pyi | 94 +++++++-------- .../2and3/markdown/extensions/abbr.pyi | 12 +- .../2and3/markdown/extensions/admonition.pyi | 14 +-- .../2and3/markdown/extensions/attr_list.pyi | 22 ++-- .../2and3/markdown/extensions/codehilite.pyi | 34 +++--- .../2and3/markdown/extensions/def_list.pyi | 18 +-- .../2and3/markdown/extensions/extra.pyi | 8 +- .../2and3/markdown/extensions/fenced_code.pyi | 12 +- .../2and3/markdown/extensions/footnotes.pyi | 68 +++++------ .../markdown/extensions/legacy_attrs.pyi | 8 +- .../2and3/markdown/extensions/legacy_em.pyi | 6 +- .../2and3/markdown/extensions/md_in_html.pyi | 8 +- .../2and3/markdown/extensions/meta.pyi | 8 +- .../2and3/markdown/extensions/nl2br.pyi | 4 +- .../2and3/markdown/extensions/sane_lists.pyi | 16 +-- .../2and3/markdown/extensions/smarty.pyi | 28 ++--- .../2and3/markdown/extensions/tables.pyi | 14 +-- third_party/2and3/markdown/extensions/toc.pyi | 64 +++++----- .../2and3/markdown/extensions/wikilinks.pyi | 18 +-- third_party/2and3/markdown/inlinepatterns.pyi | 114 +++++++++--------- third_party/2and3/markdown/pep562.pyi | 6 +- third_party/2and3/markdown/postprocessors.pyi | 16 +-- third_party/2and3/markdown/preprocessors.pyi | 22 ++-- third_party/2and3/markdown/serializers.pyi | 4 +- third_party/2and3/markdown/treeprocessors.pyi | 22 ++-- third_party/2and3/markdown/util.pyi | 40 +++--- 27 files changed, 350 insertions(+), 350 deletions(-) diff --git a/third_party/2and3/markdown/blockparser.pyi b/third_party/2and3/markdown/blockparser.pyi index b820eb9d435d..602ecca0b504 100644 --- a/third_party/2and3/markdown/blockparser.pyi +++ b/third_party/2and3/markdown/blockparser.pyi @@ -1,18 +1,18 @@ from typing import Any class State(list): - def set(self, state: Any) -> None: ... + def set(self, state) -> None: ... def reset(self) -> None: ... - def isstate(self, state: Any): ... + def isstate(self, state): ... class BlockParser: - blockprocessors: Any = ... - state: Any = ... - md: Any = ... - def __init__(self, md: Any) -> None: ... + blockprocessors: Any + state: Any + md: Any + def __init__(self, md) -> None: ... @property def markdown(self): ... - root: Any = ... - def parseDocument(self, lines: Any): ... - def parseChunk(self, parent: Any, text: Any) -> None: ... - def parseBlocks(self, parent: Any, blocks: Any) -> None: ... + 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 index 9a2a75abfc61..b4c745d4adc0 100644 --- a/third_party/2and3/markdown/blockprocessors.pyi +++ b/third_party/2and3/markdown/blockprocessors.pyi @@ -2,77 +2,77 @@ from typing import Any logger: Any -def build_block_parser(md: Any, **kwargs: Any): ... +def build_block_parser(md, **kwargs): ... class BlockProcessor: - parser: Any = ... - tab_length: Any = ... - def __init__(self, parser: Any) -> None: ... - def lastChild(self, parent: Any): ... - def detab(self, text: Any): ... - def looseDetab(self, text: Any, level: int = ...): ... - def test(self, parent: Any, block: Any) -> None: ... - def run(self, parent: Any, blocks: Any) -> None: ... + 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: Any = ... - def __init__(self, *args: Any) -> None: ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... - def create_item(self, parent: Any, block: Any) -> None: ... - def get_level(self, parent: Any, block: Any): ... + ITEM_TYPES: Any + LIST_TYPES: Any + INDENT_RE: Any + 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: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class BlockQuoteProcessor(BlockProcessor): - RE: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... - def clean(self, line: Any): ... + RE: Any + 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: Any = ... - CHILD_RE: Any = ... - INDENT_RE: Any = ... - def __init__(self, parser: Any) -> None: ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... - def get_items(self, block: Any): ... + SIBLING_TAGS: Any + RE: Any + CHILD_RE: Any + INDENT_RE: Any + 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: Any = ... - def __init__(self, parser: Any) -> None: ... + RE: Any + def __init__(self, parser) -> None: ... class HashHeaderProcessor(BlockProcessor): - RE: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + RE: Any + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class SetextHeaderProcessor(BlockProcessor): - RE: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + RE: Any + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class HRProcessor(BlockProcessor): RE: str = ... - SEARCH_RE: Any = ... - match: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + SEARCH_RE: Any + match: Any + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class EmptyBlockProcessor(BlockProcessor): - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class ParagraphProcessor(BlockProcessor): - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi index 1860b6963495..167b97adb397 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -6,14 +6,14 @@ from typing import Any ABBR_REF_RE: Any class AbbrExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... class AbbrPreprocessor(Preprocessor): - def run(self, lines: Any): ... + def run(self, lines): ... class AbbrInlineProcessor(InlineProcessor): - title: Any = ... - def __init__(self, pattern: Any, title: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + title: Any + def __init__(self, pattern, title) -> None: ... + def handleMatch(self, m, data): ... # type: ignore -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi index 20a0b8ecc30d..0281180e9880 100644 --- a/third_party/2and3/markdown/extensions/admonition.pyi +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -3,15 +3,15 @@ from ..blockprocessors import BlockProcessor from typing import Any class AdmonitionExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... class AdmonitionProcessor(BlockProcessor): CLASSNAME: str = ... CLASSNAME_TITLE: str = ... - RE: Any = ... - RE_SPACES: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... - def get_class_and_title(self, match: Any): ... + RE: Any + RE_SPACES: Any + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... + def get_class_and_title(self, match): ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/attr_list.pyi b/third_party/2and3/markdown/extensions/attr_list.pyi index 72d33db33391..0ca082fac8a9 100644 --- a/third_party/2and3/markdown/extensions/attr_list.pyi +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -2,20 +2,20 @@ from . import Extension from ..treeprocessors import Treeprocessor from typing import Any -def get_attrs(str: Any): ... -def isheader(elem: Any): ... +def get_attrs(str): ... +def isheader(elem): ... class AttrListTreeprocessor(Treeprocessor): BASE_RE: str = ... - HEADER_RE: Any = ... - BLOCK_RE: Any = ... - INLINE_RE: Any = ... - NAME_RE: Any = ... - def run(self, doc: Any) -> None: ... - def assign_attrs(self, elem: Any, attrs: Any) -> None: ... - def sanitize_name(self, name: Any): ... + HEADER_RE: Any + BLOCK_RE: Any + INLINE_RE: Any + NAME_RE: Any + def run(self, doc) -> None: ... + def assign_attrs(self, elem, attrs) -> None: ... + def sanitize_name(self, name): ... class AttrListExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi index 25a85c2fba6b..6646999b5b26 100644 --- a/third_party/2and3/markdown/extensions/codehilite.pyi +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -4,29 +4,29 @@ from typing import Any, Optional pygments: bool -def parse_hl_lines(expr: Any): ... +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 = ... + 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: Any): ... - def run(self, root: Any) -> None: ... + def code_unescape(self, text): ... + def run(self, root) -> None: ... class CodeHiliteExtension(Extension): - config: Any = ... - def __init__(self, **kwargs: Any) -> None: ... - def extendMarkdown(self, md: Any) -> None: ... + config: Any + def __init__(self, **kwargs) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/def_list.pyi b/third_party/2and3/markdown/extensions/def_list.pyi index a04c1de3db11..ebf783ce676b 100644 --- a/third_party/2and3/markdown/extensions/def_list.pyi +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -3,17 +3,17 @@ from ..blockprocessors import BlockProcessor, ListIndentProcessor from typing import Any class DefListProcessor(BlockProcessor): - RE: Any = ... - NO_INDENT_RE: Any = ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any): ... + RE: Any + NO_INDENT_RE: Any + def test(self, parent, block): ... + def run(self, parent, blocks): ... class DefListIndentProcessor(ListIndentProcessor): - ITEM_TYPES: Any = ... - LIST_TYPES: Any = ... - def create_item(self, parent: Any, block: Any) -> None: ... + ITEM_TYPES: Any + LIST_TYPES: Any + def create_item(self, parent, block) -> None: ... class DefListExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi index 426f5515537a..e0d23cc7a5d8 100644 --- a/third_party/2and3/markdown/extensions/extra.pyi +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -4,8 +4,8 @@ from typing import Any extensions: Any class ExtraExtension(Extension): - config: Any = ... - def __init__(self, **kwargs: Any) -> None: ... - def extendMarkdown(self, md: Any) -> None: ... + config: Any + def __init__(self, **kwargs) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/fenced_code.pyi b/third_party/2and3/markdown/extensions/fenced_code.pyi index 88e21c31d92b..ce0cb0b67933 100644 --- a/third_party/2and3/markdown/extensions/fenced_code.pyi +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -3,15 +3,15 @@ from ..preprocessors import Preprocessor from typing import Any class FencedCodeExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... class FencedBlockPreprocessor(Preprocessor): - FENCED_BLOCK_RE: Any = ... + FENCED_BLOCK_RE: Any CODE_WRAP: str = ... LANG_TAG: str = ... checked_for_codehilite: bool = ... - codehilite_conf: Any = ... - def __init__(self, md: Any) -> None: ... - def run(self, lines: Any): ... + codehilite_conf: Any + def __init__(self, md) -> None: ... + def run(self, lines): ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index 236a46d8cfd0..35b611819041 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -12,52 +12,52 @@ TABBED_RE: Any RE_REF_ID: Any class FootnoteExtension(Extension): - config: Any = ... + config: Any unique_prefix: int = ... - found_refs: Any = ... - used_refs: Any = ... - def __init__(self, **kwargs: Any) -> None: ... - parser: Any = ... - md: Any = ... - def extendMarkdown(self, md: Any) -> None: ... - footnotes: Any = ... + 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: Any, found: bool = ...): ... - def findFootnotesPlaceholder(self, root: Any): ... - def setFootnote(self, id: Any, text: Any) -> 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: Any): ... - def makeFootnoteRefId(self, id: Any, found: bool = ...): ... - def makeFootnotesDiv(self, root: Any): ... + def makeFootnoteId(self, id): ... + def makeFootnoteRefId(self, id, found: bool = ...): ... + def makeFootnotesDiv(self, root): ... class FootnotePreprocessor(Preprocessor): - footnotes: Any = ... - def __init__(self, footnotes: Any) -> None: ... - def run(self, lines: Any): ... - def detectTabbed(self, lines: Any): ... + footnotes: Any + def __init__(self, footnotes) -> None: ... + def run(self, lines): ... + def detectTabbed(self, lines): ... class FootnoteInlineProcessor(InlineProcessor): - footnotes: Any = ... - def __init__(self, pattern: Any, footnotes: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + footnotes: Any + def __init__(self, pattern, footnotes) -> None: ... + def handleMatch(self, m, data): ... # type: ignore class FootnotePostTreeprocessor(Treeprocessor): - footnotes: Any = ... - def __init__(self, footnotes: Any) -> None: ... - def add_duplicates(self, li: Any, duplicates: Any) -> None: ... - def get_num_duplicates(self, li: Any): ... - def handle_duplicates(self, parent: Any) -> None: ... + 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: Any) -> None: ... + def run(self, root) -> None: ... class FootnoteTreeprocessor(Treeprocessor): - footnotes: Any = ... - def __init__(self, footnotes: Any) -> None: ... - def run(self, root: Any) -> None: ... + footnotes: Any + def __init__(self, footnotes) -> None: ... + def run(self, root) -> None: ... class FootnotePostprocessor(Postprocessor): - footnotes: Any = ... - def __init__(self, footnotes: Any) -> None: ... - def run(self, text: Any): ... + footnotes: Any + def __init__(self, footnotes) -> None: ... + def run(self, text): ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/legacy_attrs.pyi b/third_party/2and3/markdown/extensions/legacy_attrs.pyi index 08d0535ab1b9..bf5b25d06e4c 100644 --- a/third_party/2and3/markdown/extensions/legacy_attrs.pyi +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -5,10 +5,10 @@ from typing import Any ATTR_RE: Any class LegacyAttrs(Treeprocessor): - def run(self, doc: Any) -> None: ... - def handleAttributes(self, el: Any, txt: Any): ... + def run(self, doc) -> None: ... + def handleAttributes(self, el, txt): ... class LegacyAttrExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/legacy_em.pyi b/third_party/2and3/markdown/extensions/legacy_em.pyi index 33f857067d56..69a403b4cd17 100644 --- a/third_party/2and3/markdown/extensions/legacy_em.pyi +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -7,9 +7,9 @@ STRONG_RE: str STRONG_EM_RE: str class LegacyUnderscoreProcessor(UnderscoreProcessor): - PATTERNS: Any = ... + PATTERNS: Any class LegacyEmExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +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 02dab4986f7c..86ec4b21ae2e 100644 --- a/third_party/2and3/markdown/extensions/md_in_html.pyi +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -3,10 +3,10 @@ from ..blockprocessors import BlockProcessor from typing import Any, Optional class MarkdownInHtmlProcessor(BlockProcessor): - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... + def test(self, parent, block): ... + def run(self, parent, blocks, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... class MarkdownInHtmlExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi index 115099702488..ea914192b0c1 100644 --- a/third_party/2and3/markdown/extensions/meta.pyi +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -9,11 +9,11 @@ BEGIN_RE: Any END_RE: Any class MetaExtension(Extension): - md: Any = ... - def extendMarkdown(self, md: Any) -> None: ... + md: Any + def extendMarkdown(self, md) -> None: ... def reset(self) -> None: ... class MetaPreprocessor(Preprocessor): - def run(self, lines: Any): ... + def run(self, lines): ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi index f05307a3baed..c4a9d4fd5962 100644 --- a/third_party/2and3/markdown/extensions/nl2br.pyi +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -4,6 +4,6 @@ from typing import Any BR_RE: str class Nl2BrExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi index 8e3a9aec1552..393c59a5dcec 100644 --- a/third_party/2and3/markdown/extensions/sane_lists.pyi +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -3,17 +3,17 @@ from ..blockprocessors import OListProcessor, UListProcessor from typing import Any class SaneOListProcessor(OListProcessor): - SIBLING_TAGS: Any = ... + SIBLING_TAGS: Any LAZY_OL: bool = ... - CHILD_RE: Any = ... - def __init__(self, parser: Any) -> None: ... + CHILD_RE: Any + def __init__(self, parser) -> None: ... class SaneUListProcessor(UListProcessor): - SIBLING_TAGS: Any = ... - CHILD_RE: Any = ... - def __init__(self, parser: Any) -> None: ... + SIBLING_TAGS: Any + CHILD_RE: Any + def __init__(self, parser) -> None: ... class SaneListExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index e1603e3ca3cf..4ebac761d2fe 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -23,22 +23,22 @@ remainingDoubleQuotesRegex: str HTML_STRICT_RE: Any class SubstituteTextPattern(HtmlInlineProcessor): - replace: Any = ... - md: Any = ... - def __init__(self, pattern: Any, replace: Any, md: Any) -> None: ... + replace: Any + md: Any + def __init__(self, pattern, replace, md) -> None: ... @property def markdown(self): ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class SmartyExtension(Extension): - config: Any = ... - substitutions: Any = ... - def __init__(self, **kwargs: Any) -> None: ... - def educateDashes(self, md: Any) -> None: ... - def educateEllipses(self, md: Any) -> None: ... - def educateAngledQuotes(self, md: Any) -> None: ... - def educateQuotes(self, md: Any) -> None: ... - inlinePatterns: Any = ... - def extendMarkdown(self, md: Any) -> None: ... + 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: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/tables.pyi b/third_party/2and3/markdown/extensions/tables.pyi index 2b4e8ef9b13f..3ff369055af3 100644 --- a/third_party/2and3/markdown/extensions/tables.pyi +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -7,15 +7,15 @@ PIPE_LEFT: int PIPE_RIGHT: int class TableProcessor(BlockProcessor): - RE_CODE_PIPES: Any = ... - RE_END_BORDER: Any = ... + RE_CODE_PIPES: Any + RE_END_BORDER: Any border: bool = ... separator: str = ... - def __init__(self, parser: Any) -> None: ... - def test(self, parent: Any, block: Any): ... - def run(self, parent: Any, blocks: Any) -> None: ... + def __init__(self, parser) -> None: ... + def test(self, parent, block): ... + def run(self, parent, blocks) -> None: ... class TableExtension(Extension): - def extendMarkdown(self, md: Any) -> None: ... + def extendMarkdown(self, md) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi index abca9d164e8f..2b6b6223df9b 100644 --- a/third_party/2and3/markdown/extensions/toc.pyi +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -2,45 +2,45 @@ from . import Extension from ..treeprocessors import Treeprocessor from typing import Any -def slugify(value: Any, separator: Any): ... +def slugify(value, separator): ... IDCOUNT_RE: Any -def unique(id: Any, ids: Any): ... -def get_name(el: Any): ... -def stashedHTML2text(text: Any, md: Any, strip_entities: bool = ...): ... -def unescape(text: Any): ... -def nest_toc_tokens(toc_list: Any): ... +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 = ... + 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: Any, config: Any) -> None: ... - def iterparent(self, node: Any) -> None: ... - def replace_marker(self, root: Any, elem: Any) -> None: ... - def set_level(self, elem: Any) -> None: ... - def add_anchor(self, c: Any, elem_id: Any) -> None: ... - def add_permalink(self, c: Any, elem_id: Any) -> None: ... - def build_toc_div(self, toc_list: Any): ... - def run(self, doc: Any) -> None: ... + 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: Any) -> None: ... - md: Any = ... - def extendMarkdown(self, md: Any) -> None: ... + TreeProcessorClass: Any + config: Any + def __init__(self, **kwargs) -> None: ... + md: Any + def extendMarkdown(self, md) -> None: ... def reset(self) -> None: ... -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi index 2f42f27513d5..0a36634776dc 100644 --- a/third_party/2and3/markdown/extensions/wikilinks.pyi +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -2,17 +2,17 @@ from . import Extension from ..inlinepatterns import InlineProcessor from typing import Any -def build_url(label: Any, base: Any, end: Any): ... +def build_url(label, base, end): ... class WikiLinkExtension(Extension): - config: Any = ... - def __init__(self, **kwargs: Any) -> None: ... - md: Any = ... - def extendMarkdown(self, md: Any) -> None: ... + config: Any + def __init__(self, **kwargs) -> None: ... + md: Any + def extendMarkdown(self, md) -> None: ... class WikiLinksInlineProcessor(InlineProcessor): - config: Any = ... - def __init__(self, pattern: Any, config: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + config: Any + def __init__(self, pattern, config) -> None: ... + def handleMatch(self, m, data): ... # type: ignore -def makeExtension(**kwargs: Any): ... +def makeExtension(**kwargs): ... diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi index 55f3b1ee736c..e233e64f5b8c 100644 --- a/third_party/2and3/markdown/inlinepatterns.pyi +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -1,6 +1,6 @@ from typing import Any, Optional -def build_inlinepatterns(md: Any, **kwargs: Any): ... +def build_inlinepatterns(md, **kwargs): ... NOIMG: str BACKTICK_RE: str @@ -17,8 +17,8 @@ STRONG_EM2_RE: str STRONG_EM3_RE: str LINK_RE: Any IMAGE_LINK_RE: str -REFERENCE_RE = LINK_RE -IMAGE_REFERENCE_RE = IMAGE_LINK_RE +REFERENCE_RE: Any +IMAGE_REFERENCE_RE: str NOT_STRONG_RE: str AUTOLINK_RE: str AUTOMAIL_RE: str @@ -26,109 +26,109 @@ HTML_RE: str ENTITY_RE: str LINE_BREAK_RE: str -def dequote(string: Any): ... +def dequote(string): ... class EmStrongItem: ... class Pattern: - ANCESTOR_EXCLUDES: Any = ... - pattern: Any = ... - compiled_re: Any = ... - md: Any = ... - def __init__(self, pattern: Any, md: Optional[Any] = ...) -> None: ... + 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: Any) -> None: ... + def handleMatch(self, m) -> None: ... def type(self): ... - def unescape(self, text: Any): ... + def unescape(self, text): ... class InlineProcessor(Pattern): - pattern: Any = ... - compiled_re: Any = ... + pattern: Any + compiled_re: Any safe_mode: bool = ... - md: Any = ... - def __init__(self, pattern: Any, md: Optional[Any] = ...) -> None: ... - def handleMatch(self, m: Any, data: Any) -> None: ... # type: ignore + 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: Any): ... + def handleMatch(self, m): ... class SimpleTextInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class EscapeInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class SimpleTagPattern(Pattern): - tag: Any = ... - def __init__(self, pattern: Any, tag: Any) -> None: ... - def handleMatch(self, m: Any): ... + tag: Any + def __init__(self, pattern, tag) -> None: ... + def handleMatch(self, m): ... class SimpleTagInlineProcessor(InlineProcessor): - tag: Any = ... - def __init__(self, pattern: Any, tag: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + tag: Any + def __init__(self, pattern, tag) -> None: ... + def handleMatch(self, m, data): ... # type: ignore class SubstituteTagPattern(SimpleTagPattern): - def handleMatch(self, m: Any): ... + def handleMatch(self, m): ... class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class BacktickInlineProcessor(InlineProcessor): - ESCAPED_BSLASH: Any = ... + ESCAPED_BSLASH: Any tag: str = ... - def __init__(self, pattern: Any) -> None: ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def __init__(self, pattern) -> None: ... + def handleMatch(self, m, data): ... # type: ignore class DoubleTagPattern(SimpleTagPattern): - def handleMatch(self, m: Any): ... + def handleMatch(self, m): ... class DoubleTagInlineProcessor(SimpleTagInlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class HtmlInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore - def unescape(self, text: Any): ... + def handleMatch(self, m, data): ... # type: ignore + def unescape(self, text): ... class AsteriskProcessor(InlineProcessor): - PATTERNS: Any = ... - def build_single(self, m: Any, tag: Any, idx: Any): ... - def build_double(self, m: Any, tags: Any, idx: Any): ... - def build_double2(self, m: Any, tags: Any, idx: Any): ... - def parse_sub_patterns(self, data: Any, parent: Any, last: Any, idx: Any) -> None: ... - def build_element(self, m: Any, builder: Any, tags: Any, index: Any): ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore + 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 = ... + PATTERNS: Any class LinkInlineProcessor(InlineProcessor): - RE_LINK: Any = ... - RE_TITLE_CLEAN: Any = ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore - def getLink(self, data: Any, index: Any): ... - def getText(self, data: Any, index: Any): ... + 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: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class ReferenceInlineProcessor(LinkInlineProcessor): - NEWLINE_CLEANUP_RE: Any = ... - RE_LINK: Any = ... - def handleMatch(self, m: Any, data: Any): ... # type: ignore - def evalId(self, data: Any, index: Any, text: Any): ... - def makeTag(self, href: Any, title: Any, text: Any): ... + NEWLINE_CLEANUP_RE: Any + 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: Any, index: Any, text: Any): ... + def evalId(self, data, index, text): ... class ImageReferenceInlineProcessor(ReferenceInlineProcessor): - def makeTag(self, href: Any, title: Any, text: Any): ... + def makeTag(self, href, title, text): ... class AutolinkInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore class AutomailInlineProcessor(InlineProcessor): - def handleMatch(self, m: Any, data: Any): ... # type: ignore + def handleMatch(self, m, data): ... # type: ignore diff --git a/third_party/2and3/markdown/pep562.pyi b/third_party/2and3/markdown/pep562.pyi index 76a328807b7b..398bf66b8313 100644 --- a/third_party/2and3/markdown/pep562.pyi +++ b/third_party/2and3/markdown/pep562.pyi @@ -1,9 +1,9 @@ from typing import Any class Version: - def __new__(cls, major: Any, minor: Any, micro: Any, release: str = ..., pre: int = ..., post: int = ..., dev: int = ...): ... + def __new__(cls, major, minor, micro, release: str = ..., pre: int = ..., post: int = ..., dev: int = ...): ... class Pep562: - def __init__(self, name: Any) -> None: ... + def __init__(self, name) -> None: ... def __dir__(self): ... - def __getattr__(self, name: Any): ... + def __getattr__(self, name): ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi index 69051ef0d6ba..3578553cd889 100644 --- a/third_party/2and3/markdown/postprocessors.pyi +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -1,19 +1,19 @@ from . import util from typing import Any -def build_postprocessors(md: Any, **kwargs: Any): ... +def build_postprocessors(md, **kwargs): ... class Postprocessor(util.Processor): - def run(self, text: Any) -> None: ... + def run(self, text) -> None: ... class RawHtmlPostprocessor(Postprocessor): - def run(self, text: Any): ... - def isblocklevel(self, html: Any): ... + def run(self, text): ... + def isblocklevel(self, html): ... class AndSubstitutePostprocessor(Postprocessor): - def run(self, text: Any): ... + def run(self, text): ... class UnescapePostprocessor(Postprocessor): - RE: Any = ... - def unescape(self, m: Any): ... - def run(self, text: Any): ... + RE: Any + 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 ef103f658fe3..ea467a8ace9a 100644 --- a/third_party/2and3/markdown/preprocessors.pyi +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -1,25 +1,25 @@ from . import util from typing import Any -def build_preprocessors(md: Any, **kwargs: Any): ... +def build_preprocessors(md, **kwargs): ... class Preprocessor(util.Processor): - def run(self, lines: Any) -> None: ... + def run(self, lines) -> None: ... class NormalizeWhitespace(Preprocessor): - def run(self, lines: Any): ... + def run(self, lines): ... class HtmlBlockPreprocessor(Preprocessor): - right_tag_patterns: Any = ... + right_tag_patterns: Any attrs_pattern: str = ... - left_tag_pattern: Any = ... - attrs_re: Any = ... - left_tag_re: Any = ... + left_tag_pattern: Any + attrs_re: Any + left_tag_re: Any markdown_in_raw: bool = ... - def run(self, lines: Any): ... + def run(self, lines): ... class ReferencePreprocessor(Preprocessor): TITLE: str = ... - RE: Any = ... - TITLE_RE: Any = ... - def run(self, lines: Any): ... + RE: Any + TITLE_RE: Any + def run(self, lines): ... diff --git a/third_party/2and3/markdown/serializers.pyi b/third_party/2and3/markdown/serializers.pyi index 9ad4248947db..cdad4b1b613d 100644 --- a/third_party/2and3/markdown/serializers.pyi +++ b/third_party/2and3/markdown/serializers.pyi @@ -1,4 +1,4 @@ from typing import Any -def to_html_string(element: Any): ... -def to_xhtml_string(element: 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 index 02db04b7ccfa..92bfe1f320ff 100644 --- a/third_party/2and3/markdown/treeprocessors.pyi +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -1,22 +1,22 @@ from . import util from typing import Any, Optional -def build_treeprocessors(md: Any, **kwargs: Any): ... -def isString(s: Any): ... +def build_treeprocessors(md, **kwargs): ... +def isString(s): ... class Treeprocessor(util.Processor): - def run(self, root: Any) -> None: ... + def run(self, root) -> None: ... class InlineProcessor(Treeprocessor): - md: Any = ... - inlinePatterns: Any = ... - ancestors: Any = ... - def __init__(self, md: Any) -> None: ... + 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: Any, ancestors: Optional[Any] = ...): ... + stashed_nodes: Any + parent_map: Any + def run(self, tree, ancestors: Optional[Any] = ...): ... class PrettifyTreeprocessor(Treeprocessor): - def run(self, root: Any) -> None: ... + def run(self, root) -> None: ... diff --git a/third_party/2and3/markdown/util.pyi b/third_party/2and3/markdown/util.pyi index b2e9902d3a8e..9a8b8640a76a 100644 --- a/third_party/2and3/markdown/util.pyi +++ b/third_party/2and3/markdown/util.pyi @@ -16,43 +16,43 @@ TAG_PLACEHOLDER: Any INSTALLED_EXTENSIONS: Any RTL_BIDI_RANGES: Any -def deprecated(message: Any, stacklevel: int = ...): ... -def isBlockLevel(tag: Any): ... -def parseBoolValue(value: Any, fail_on_errors: bool = ..., preserve_none: bool = ...): ... -def code_escape(text: 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 = ... + md: Any def __init__(self, md: Optional[Any] = ...) -> None: ... @property def markdown(self): ... class HtmlStash: html_counter: int = ... - rawHtmlBlocks: Any = ... + rawHtmlBlocks: Any tag_counter: int = ... - tag_data: Any = ... + tag_data: Any def __init__(self) -> None: ... - def store(self, html: Any): ... + def store(self, html): ... def reset(self) -> None: ... - def get_placeholder(self, key: Any): ... - def store_tag(self, tag: Any, attrs: Any, left_index: Any, right_index: Any): ... + 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: Any): ... + def __contains__(self, item): ... def __iter__(self) -> Any: ... - def __getitem__(self, key: Any): ... + def __getitem__(self, key): ... def __len__(self): ... - def get_index_for_name(self, name: Any): ... - def register(self, item: Any, name: Any, priority: Any) -> None: ... - def deregister(self, name: Any, strict: bool = ...) -> None: ... - def __setitem__(self, key: Any, value: Any) -> None: ... - def __delitem__(self, key: Any) -> None: ... - def add(self, key: Any, value: Any, location: Any) -> None: ... - -def __getattr__(name: Any): ... + 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): ... From 1ab9878d619aa629636f99057943d7949a2c32a2 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 25 Sep 2020 00:32:06 -0700 Subject: [PATCH 4/7] reformat --- .../2and3/markdown/extensions/abbr.pyi | 5 +++-- .../2and3/markdown/extensions/admonition.pyi | 5 +++-- .../2and3/markdown/extensions/attr_list.pyi | 5 +++-- .../2and3/markdown/extensions/codehilite.pyi | 19 ++++++++++++++++--- .../2and3/markdown/extensions/def_list.pyi | 5 +++-- .../2and3/markdown/extensions/extra.pyi | 3 ++- .../2and3/markdown/extensions/fenced_code.pyi | 5 +++-- .../2and3/markdown/extensions/footnotes.pyi | 5 +++-- .../markdown/extensions/legacy_attrs.pyi | 3 ++- .../2and3/markdown/extensions/legacy_em.pyi | 5 +++-- .../2and3/markdown/extensions/md_in_html.pyi | 5 +++-- .../2and3/markdown/extensions/meta.pyi | 5 +++-- .../2and3/markdown/extensions/nl2br.pyi | 3 ++- .../2and3/markdown/extensions/sane_lists.pyi | 5 +++-- .../2and3/markdown/extensions/smarty.pyi | 5 +++-- .../2and3/markdown/extensions/tables.pyi | 5 +++-- third_party/2and3/markdown/extensions/toc.pyi | 5 +++-- .../2and3/markdown/extensions/wikilinks.pyi | 5 +++-- third_party/2and3/markdown/postprocessors.pyi | 3 ++- third_party/2and3/markdown/preprocessors.pyi | 3 ++- third_party/2and3/markdown/treeprocessors.pyi | 3 ++- third_party/2and3/markdown/util.pyi | 2 +- 22 files changed, 71 insertions(+), 38 deletions(-) diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi index 167b97adb397..25462a945b41 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -1,7 +1,8 @@ -from . import Extension +from typing import Any + from ..inlinepatterns import InlineProcessor from ..preprocessors import Preprocessor -from typing import Any +from . import Extension ABBR_REF_RE: Any diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi index 0281180e9880..012df64187f7 100644 --- a/third_party/2and3/markdown/extensions/admonition.pyi +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..blockprocessors import BlockProcessor from typing import Any +from ..blockprocessors import BlockProcessor +from . import Extension + class AdmonitionExtension(Extension): def extendMarkdown(self, md) -> None: ... diff --git a/third_party/2and3/markdown/extensions/attr_list.pyi b/third_party/2and3/markdown/extensions/attr_list.pyi index 0ca082fac8a9..f8ca85f0f34a 100644 --- a/third_party/2and3/markdown/extensions/attr_list.pyi +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..treeprocessors import Treeprocessor from typing import Any +from ..treeprocessors import Treeprocessor +from . import Extension + def get_attrs(str): ... def isheader(elem): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi index 6646999b5b26..4e5caccf0760 100644 --- a/third_party/2and3/markdown/extensions/codehilite.pyi +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..treeprocessors import Treeprocessor from typing import Any, Optional +from ..treeprocessors import Treeprocessor +from . import Extension + pygments: bool def parse_hl_lines(expr): ... @@ -17,7 +18,19 @@ class CodeHilite: 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 __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): diff --git a/third_party/2and3/markdown/extensions/def_list.pyi b/third_party/2and3/markdown/extensions/def_list.pyi index ebf783ce676b..5444aa0a915d 100644 --- a/third_party/2and3/markdown/extensions/def_list.pyi +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..blockprocessors import BlockProcessor, ListIndentProcessor from typing import Any +from ..blockprocessors import BlockProcessor, ListIndentProcessor +from . import Extension + class DefListProcessor(BlockProcessor): RE: Any NO_INDENT_RE: Any diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi index e0d23cc7a5d8..f717851784cc 100644 --- a/third_party/2and3/markdown/extensions/extra.pyi +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -1,6 +1,7 @@ -from . import Extension from typing import Any +from . import Extension + extensions: Any class ExtraExtension(Extension): diff --git a/third_party/2and3/markdown/extensions/fenced_code.pyi b/third_party/2and3/markdown/extensions/fenced_code.pyi index ce0cb0b67933..9bd8ae352713 100644 --- a/third_party/2and3/markdown/extensions/fenced_code.pyi +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..preprocessors import Preprocessor from typing import Any +from ..preprocessors import Preprocessor +from . import Extension + class FencedCodeExtension(Extension): def extendMarkdown(self, md) -> None: ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index 35b611819041..560b2d3c01ee 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -1,9 +1,10 @@ -from . import Extension +from typing import Any + from ..inlinepatterns import InlineProcessor from ..postprocessors import Postprocessor from ..preprocessors import Preprocessor from ..treeprocessors import Treeprocessor -from typing import Any +from . import Extension FN_BACKLINK_TEXT: Any NBSP_PLACEHOLDER: Any diff --git a/third_party/2and3/markdown/extensions/legacy_attrs.pyi b/third_party/2and3/markdown/extensions/legacy_attrs.pyi index bf5b25d06e4c..4196fabd51a2 100644 --- a/third_party/2and3/markdown/extensions/legacy_attrs.pyi +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -1,6 +1,7 @@ +from typing import Any + from markdown.extensions import Extension from markdown.treeprocessors import Treeprocessor -from typing import Any ATTR_RE: Any diff --git a/third_party/2and3/markdown/extensions/legacy_em.pyi b/third_party/2and3/markdown/extensions/legacy_em.pyi index 69a403b4cd17..813e28fdb9c6 100644 --- a/third_party/2and3/markdown/extensions/legacy_em.pyi +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..inlinepatterns import UnderscoreProcessor from typing import Any +from ..inlinepatterns import UnderscoreProcessor +from . import Extension + EMPHASIS_RE: str STRONG_RE: str STRONG_EM_RE: str diff --git a/third_party/2and3/markdown/extensions/md_in_html.pyi b/third_party/2and3/markdown/extensions/md_in_html.pyi index 86ec4b21ae2e..c6d41643edc0 100644 --- a/third_party/2and3/markdown/extensions/md_in_html.pyi +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..blockprocessors import BlockProcessor from typing import Any, Optional +from ..blockprocessors import BlockProcessor +from . import Extension + class MarkdownInHtmlProcessor(BlockProcessor): def test(self, parent, block): ... def run(self, parent, blocks, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi index ea914192b0c1..016c4d8a90cf 100644 --- a/third_party/2and3/markdown/extensions/meta.pyi +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..preprocessors import Preprocessor from typing import Any +from ..preprocessors import Preprocessor +from . import Extension + log: Any META_RE: Any META_MORE_RE: Any diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi index c4a9d4fd5962..10b6e2ba2314 100644 --- a/third_party/2and3/markdown/extensions/nl2br.pyi +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -1,6 +1,7 @@ -from . import Extension from typing import Any +from . import Extension + BR_RE: str class Nl2BrExtension(Extension): diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi index 393c59a5dcec..c30a32ab9ebe 100644 --- a/third_party/2and3/markdown/extensions/sane_lists.pyi +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..blockprocessors import OListProcessor, UListProcessor from typing import Any +from ..blockprocessors import OListProcessor, UListProcessor +from . import Extension + class SaneOListProcessor(OListProcessor): SIBLING_TAGS: Any LAZY_OL: bool = ... diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index 4ebac761d2fe..f77e31b6f1ec 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..inlinepatterns import HtmlInlineProcessor from typing import Any +from ..inlinepatterns import HtmlInlineProcessor +from . import Extension + punctClass: str endOfWordClass: str closeClass: str diff --git a/third_party/2and3/markdown/extensions/tables.pyi b/third_party/2and3/markdown/extensions/tables.pyi index 3ff369055af3..bb21f81154de 100644 --- a/third_party/2and3/markdown/extensions/tables.pyi +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..blockprocessors import BlockProcessor from typing import Any +from ..blockprocessors import BlockProcessor +from . import Extension + PIPE_NONE: int PIPE_LEFT: int PIPE_RIGHT: int diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi index 2b6b6223df9b..27c4cd68b724 100644 --- a/third_party/2and3/markdown/extensions/toc.pyi +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..treeprocessors import Treeprocessor from typing import Any +from ..treeprocessors import Treeprocessor +from . import Extension + def slugify(value, separator): ... IDCOUNT_RE: Any diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi index 0a36634776dc..2eb11c0a6c27 100644 --- a/third_party/2and3/markdown/extensions/wikilinks.pyi +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -1,7 +1,8 @@ -from . import Extension -from ..inlinepatterns import InlineProcessor from typing import Any +from ..inlinepatterns import InlineProcessor +from . import Extension + def build_url(label, base, end): ... class WikiLinkExtension(Extension): diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi index 3578553cd889..fe276f35522e 100644 --- a/third_party/2and3/markdown/postprocessors.pyi +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -1,6 +1,7 @@ -from . import util from typing import Any +from . import util + def build_postprocessors(md, **kwargs): ... class Postprocessor(util.Processor): diff --git a/third_party/2and3/markdown/preprocessors.pyi b/third_party/2and3/markdown/preprocessors.pyi index ea467a8ace9a..61985d9da4ea 100644 --- a/third_party/2and3/markdown/preprocessors.pyi +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -1,6 +1,7 @@ -from . import util from typing import Any +from . import util + def build_preprocessors(md, **kwargs): ... class Preprocessor(util.Processor): diff --git a/third_party/2and3/markdown/treeprocessors.pyi b/third_party/2and3/markdown/treeprocessors.pyi index 92bfe1f320ff..f05cd795c73f 100644 --- a/third_party/2and3/markdown/treeprocessors.pyi +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -1,6 +1,7 @@ -from . import util from typing import Any, Optional +from . import util + def build_treeprocessors(md, **kwargs): ... def isString(s): ... diff --git a/third_party/2and3/markdown/util.pyi b/third_party/2and3/markdown/util.pyi index 9a8b8640a76a..521eed39f8d8 100644 --- a/third_party/2and3/markdown/util.pyi +++ b/third_party/2and3/markdown/util.pyi @@ -40,7 +40,7 @@ class HtmlStash: def get_placeholder(self, key): ... def store_tag(self, tag, attrs, left_index, right_index): ... -_PriorityItem = namedtuple('PriorityItem', ['name', 'priority']) +_PriorityItem = namedtuple("PriorityItem", ["name", "priority"]) class Registry: def __init__(self) -> None: ... From 609741f6ef3b0b3facf1ae792ac7c1c79a84e7b9 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 25 Sep 2020 00:49:31 -0700 Subject: [PATCH 5/7] use absolute imports for pytype's sake --- third_party/2and3/markdown/extensions/__init__.pyi | 2 +- third_party/2and3/markdown/extensions/abbr.pyi | 6 +++--- third_party/2and3/markdown/extensions/admonition.pyi | 4 ++-- third_party/2and3/markdown/extensions/attr_list.pyi | 4 ++-- third_party/2and3/markdown/extensions/codehilite.pyi | 4 ++-- third_party/2and3/markdown/extensions/def_list.pyi | 4 ++-- third_party/2and3/markdown/extensions/extra.pyi | 2 +- third_party/2and3/markdown/extensions/fenced_code.pyi | 4 ++-- third_party/2and3/markdown/extensions/footnotes.pyi | 10 +++++----- third_party/2and3/markdown/extensions/legacy_em.pyi | 4 ++-- third_party/2and3/markdown/extensions/md_in_html.pyi | 4 ++-- third_party/2and3/markdown/extensions/meta.pyi | 4 ++-- third_party/2and3/markdown/extensions/nl2br.pyi | 2 +- third_party/2and3/markdown/extensions/sane_lists.pyi | 4 ++-- third_party/2and3/markdown/extensions/smarty.pyi | 4 ++-- third_party/2and3/markdown/extensions/tables.pyi | 4 ++-- third_party/2and3/markdown/extensions/toc.pyi | 4 ++-- third_party/2and3/markdown/extensions/wikilinks.pyi | 4 ++-- third_party/2and3/yaml/__init__.pyi | 3 +-- 19 files changed, 38 insertions(+), 39 deletions(-) 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 index 25462a945b41..390bb3263264 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -1,8 +1,8 @@ from typing import Any -from ..inlinepatterns import InlineProcessor -from ..preprocessors import Preprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.inlinepatterns import InlineProcessor +from markdown.preprocessors import Preprocessor ABBR_REF_RE: Any diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi index 012df64187f7..e228d7fd031b 100644 --- a/third_party/2and3/markdown/extensions/admonition.pyi +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..blockprocessors import BlockProcessor -from . import Extension +from markdown.blockprocessors import BlockProcessor +from markdown.extensions import Extension class AdmonitionExtension(Extension): def extendMarkdown(self, md) -> None: ... diff --git a/third_party/2and3/markdown/extensions/attr_list.pyi b/third_party/2and3/markdown/extensions/attr_list.pyi index f8ca85f0f34a..547380ed12fd 100644 --- a/third_party/2and3/markdown/extensions/attr_list.pyi +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..treeprocessors import Treeprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor def get_attrs(str): ... def isheader(elem): ... diff --git a/third_party/2and3/markdown/extensions/codehilite.pyi b/third_party/2and3/markdown/extensions/codehilite.pyi index 4e5caccf0760..8b1eb461d8a4 100644 --- a/third_party/2and3/markdown/extensions/codehilite.pyi +++ b/third_party/2and3/markdown/extensions/codehilite.pyi @@ -1,7 +1,7 @@ from typing import Any, Optional -from ..treeprocessors import Treeprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor pygments: bool diff --git a/third_party/2and3/markdown/extensions/def_list.pyi b/third_party/2and3/markdown/extensions/def_list.pyi index 5444aa0a915d..daa6e70c7cd1 100644 --- a/third_party/2and3/markdown/extensions/def_list.pyi +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..blockprocessors import BlockProcessor, ListIndentProcessor -from . import Extension +from markdown.blockprocessors import BlockProcessor, ListIndentProcessor +from markdown.extensions import Extension class DefListProcessor(BlockProcessor): RE: Any diff --git a/third_party/2and3/markdown/extensions/extra.pyi b/third_party/2and3/markdown/extensions/extra.pyi index f717851784cc..4c658270ce6c 100644 --- a/third_party/2and3/markdown/extensions/extra.pyi +++ b/third_party/2and3/markdown/extensions/extra.pyi @@ -1,6 +1,6 @@ from typing import Any -from . import Extension +from markdown.extensions import Extension extensions: Any diff --git a/third_party/2and3/markdown/extensions/fenced_code.pyi b/third_party/2and3/markdown/extensions/fenced_code.pyi index 9bd8ae352713..fbd96143dc94 100644 --- a/third_party/2and3/markdown/extensions/fenced_code.pyi +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..preprocessors import Preprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.preprocessors import Preprocessor class FencedCodeExtension(Extension): def extendMarkdown(self, md) -> None: ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index 560b2d3c01ee..da869a86428f 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -1,10 +1,10 @@ from typing import Any -from ..inlinepatterns import InlineProcessor -from ..postprocessors import Postprocessor -from ..preprocessors import Preprocessor -from ..treeprocessors import Treeprocessor -from . import Extension +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 diff --git a/third_party/2and3/markdown/extensions/legacy_em.pyi b/third_party/2and3/markdown/extensions/legacy_em.pyi index 813e28fdb9c6..55847cf9dcc3 100644 --- a/third_party/2and3/markdown/extensions/legacy_em.pyi +++ b/third_party/2and3/markdown/extensions/legacy_em.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..inlinepatterns import UnderscoreProcessor -from . import Extension +from markdown.extensions import Extension +from markdown.inlinepatterns import UnderscoreProcessor EMPHASIS_RE: str STRONG_RE: str diff --git a/third_party/2and3/markdown/extensions/md_in_html.pyi b/third_party/2and3/markdown/extensions/md_in_html.pyi index c6d41643edc0..99f19773db53 100644 --- a/third_party/2and3/markdown/extensions/md_in_html.pyi +++ b/third_party/2and3/markdown/extensions/md_in_html.pyi @@ -1,7 +1,7 @@ from typing import Any, Optional -from ..blockprocessors import BlockProcessor -from . import Extension +from markdown.blockprocessors import BlockProcessor +from markdown.extensions import Extension class MarkdownInHtmlProcessor(BlockProcessor): def test(self, parent, block): ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi index 016c4d8a90cf..22aa50071e30 100644 --- a/third_party/2and3/markdown/extensions/meta.pyi +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..preprocessors import Preprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.preprocessors import Preprocessor log: Any META_RE: Any diff --git a/third_party/2and3/markdown/extensions/nl2br.pyi b/third_party/2and3/markdown/extensions/nl2br.pyi index 10b6e2ba2314..ff8f6bf3226b 100644 --- a/third_party/2and3/markdown/extensions/nl2br.pyi +++ b/third_party/2and3/markdown/extensions/nl2br.pyi @@ -1,6 +1,6 @@ from typing import Any -from . import Extension +from markdown.extensions import Extension BR_RE: str diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi index c30a32ab9ebe..284a02e50cb5 100644 --- a/third_party/2and3/markdown/extensions/sane_lists.pyi +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..blockprocessors import OListProcessor, UListProcessor -from . import Extension +from markdown.blockprocessors import OListProcessor, UListProcessor +from markdown.extensions import Extension class SaneOListProcessor(OListProcessor): SIBLING_TAGS: Any diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index f77e31b6f1ec..6f4eb226e0df 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..inlinepatterns import HtmlInlineProcessor -from . import Extension +from markdown.extensions import Extension +from markdown.inlinepatterns import HtmlInlineProcessor punctClass: str endOfWordClass: str diff --git a/third_party/2and3/markdown/extensions/tables.pyi b/third_party/2and3/markdown/extensions/tables.pyi index bb21f81154de..700dfa0f8db7 100644 --- a/third_party/2and3/markdown/extensions/tables.pyi +++ b/third_party/2and3/markdown/extensions/tables.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..blockprocessors import BlockProcessor -from . import Extension +from markdown.blockprocessors import BlockProcessor +from markdown.extensions import Extension PIPE_NONE: int PIPE_LEFT: int diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi index 27c4cd68b724..7aae06cf9d12 100644 --- a/third_party/2and3/markdown/extensions/toc.pyi +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..treeprocessors import Treeprocessor -from . import Extension +from markdown.extensions import Extension +from markdown.treeprocessors import Treeprocessor def slugify(value, separator): ... diff --git a/third_party/2and3/markdown/extensions/wikilinks.pyi b/third_party/2and3/markdown/extensions/wikilinks.pyi index 2eb11c0a6c27..26cc954c999f 100644 --- a/third_party/2and3/markdown/extensions/wikilinks.pyi +++ b/third_party/2and3/markdown/extensions/wikilinks.pyi @@ -1,7 +1,7 @@ from typing import Any -from ..inlinepatterns import InlineProcessor -from . import Extension +from markdown.extensions import Extension +from markdown.inlinepatterns import InlineProcessor def build_url(label, base, end): ... diff --git a/third_party/2and3/yaml/__init__.pyi b/third_party/2and3/yaml/__init__.pyi index 01d64c711ff6..ac8dd0274782 100644 --- a/third_party/2and3/yaml/__init__.pyi +++ b/third_party/2and3/yaml/__init__.pyi @@ -8,9 +8,8 @@ from yaml.loader import * # noqa: F403 from yaml.nodes import * # noqa: F403 from yaml.tokens import * # noqa: F403 -from .cyaml import * - from . import resolver as resolver # Help mypy a bit; this is implied by loader and dumper +from .cyaml import * if sys.version_info < (3,): _Str = Union[Text, str] From a500b50a0e666f6abfa2a5fb65e436ace9bc9c0c Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 25 Sep 2020 12:27:58 -0700 Subject: [PATCH 6/7] fix isort version difference --- third_party/2and3/yaml/__init__.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/2and3/yaml/__init__.pyi b/third_party/2and3/yaml/__init__.pyi index ac8dd0274782..01d64c711ff6 100644 --- a/third_party/2and3/yaml/__init__.pyi +++ b/third_party/2and3/yaml/__init__.pyi @@ -8,9 +8,10 @@ from yaml.loader import * # noqa: F403 from yaml.nodes import * # noqa: F403 from yaml.tokens import * # noqa: F403 -from . import resolver as resolver # Help mypy a bit; this is implied by loader and dumper from .cyaml import * +from . import resolver as resolver # Help mypy a bit; this is implied by loader and dumper + if sys.version_info < (3,): _Str = Union[Text, str] else: From 8f2c0c556a5111551fc1df7649f36d2dcbcf6351 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 25 Sep 2020 13:07:51 -0700 Subject: [PATCH 7/7] add types for REs I ran `fastmod 'RE: Any$' 'RE: Pattern'`. I then fixed the imports. Then I ran stubtest, which complained about a couple of those substitutions (stubgen will also type as Any if something is a str expression or alias). --- .../2and3/markdown/blockprocessors.pyi | 20 +++++++++---------- .../2and3/markdown/extensions/abbr.pyi | 4 ++-- .../2and3/markdown/extensions/admonition.pyi | 4 ++-- .../2and3/markdown/extensions/attr_list.pyi | 10 +++++----- .../2and3/markdown/extensions/def_list.pyi | 6 +++--- .../2and3/markdown/extensions/fenced_code.pyi | 4 ++-- .../2and3/markdown/extensions/footnotes.pyi | 6 +++--- .../markdown/extensions/legacy_attrs.pyi | 4 ++-- .../2and3/markdown/extensions/meta.pyi | 10 +++++----- .../2and3/markdown/extensions/sane_lists.pyi | 6 +++--- .../2and3/markdown/extensions/smarty.pyi | 4 ++-- third_party/2and3/markdown/extensions/toc.pyi | 4 ++-- third_party/2and3/markdown/inlinepatterns.pyi | 6 +++--- third_party/2and3/markdown/postprocessors.pyi | 4 ++-- third_party/2and3/markdown/preprocessors.pyi | 6 +++--- third_party/2and3/markdown/util.pyi | 6 +++--- 16 files changed, 52 insertions(+), 52 deletions(-) diff --git a/third_party/2and3/markdown/blockprocessors.pyi b/third_party/2and3/markdown/blockprocessors.pyi index b4c745d4adc0..8c78bbe7b57e 100644 --- a/third_party/2and3/markdown/blockprocessors.pyi +++ b/third_party/2and3/markdown/blockprocessors.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern logger: Any @@ -17,7 +17,7 @@ class BlockProcessor: class ListIndentProcessor(BlockProcessor): ITEM_TYPES: Any LIST_TYPES: Any - INDENT_RE: Any + INDENT_RE: Pattern def __init__(self, *args) -> None: ... def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... @@ -29,7 +29,7 @@ class CodeBlockProcessor(BlockProcessor): def run(self, parent, blocks) -> None: ... class BlockQuoteProcessor(BlockProcessor): - RE: Any + RE: Pattern def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... def clean(self, line): ... @@ -39,9 +39,9 @@ class OListProcessor(BlockProcessor): STARTSWITH: str = ... LAZY_OL: bool = ... SIBLING_TAGS: Any - RE: Any - CHILD_RE: Any - INDENT_RE: 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: ... @@ -49,22 +49,22 @@ class OListProcessor(BlockProcessor): class UListProcessor(OListProcessor): TAG: str = ... - RE: Any + RE: Pattern def __init__(self, parser) -> None: ... class HashHeaderProcessor(BlockProcessor): - RE: Any + RE: Pattern def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... class SetextHeaderProcessor(BlockProcessor): - RE: Any + RE: Pattern def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... class HRProcessor(BlockProcessor): RE: str = ... - SEARCH_RE: Any + SEARCH_RE: Pattern match: Any def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... diff --git a/third_party/2and3/markdown/extensions/abbr.pyi b/third_party/2and3/markdown/extensions/abbr.pyi index 390bb3263264..3655f922311a 100644 --- a/third_party/2and3/markdown/extensions/abbr.pyi +++ b/third_party/2and3/markdown/extensions/abbr.pyi @@ -1,10 +1,10 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.inlinepatterns import InlineProcessor from markdown.preprocessors import Preprocessor -ABBR_REF_RE: Any +ABBR_REF_RE: Pattern class AbbrExtension(Extension): def extendMarkdown(self, md) -> None: ... diff --git a/third_party/2and3/markdown/extensions/admonition.pyi b/third_party/2and3/markdown/extensions/admonition.pyi index e228d7fd031b..9b7ed3ee0622 100644 --- a/third_party/2and3/markdown/extensions/admonition.pyi +++ b/third_party/2and3/markdown/extensions/admonition.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.blockprocessors import BlockProcessor from markdown.extensions import Extension @@ -9,7 +9,7 @@ class AdmonitionExtension(Extension): class AdmonitionProcessor(BlockProcessor): CLASSNAME: str = ... CLASSNAME_TITLE: str = ... - RE: Any + RE: Pattern RE_SPACES: Any def test(self, parent, block): ... def run(self, parent, blocks) -> None: ... diff --git a/third_party/2and3/markdown/extensions/attr_list.pyi b/third_party/2and3/markdown/extensions/attr_list.pyi index 547380ed12fd..29c26afd2a43 100644 --- a/third_party/2and3/markdown/extensions/attr_list.pyi +++ b/third_party/2and3/markdown/extensions/attr_list.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.treeprocessors import Treeprocessor @@ -8,10 +8,10 @@ def isheader(elem): ... class AttrListTreeprocessor(Treeprocessor): BASE_RE: str = ... - HEADER_RE: Any - BLOCK_RE: Any - INLINE_RE: Any - NAME_RE: Any + 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): ... diff --git a/third_party/2and3/markdown/extensions/def_list.pyi b/third_party/2and3/markdown/extensions/def_list.pyi index daa6e70c7cd1..1aa70d29f4b2 100644 --- a/third_party/2and3/markdown/extensions/def_list.pyi +++ b/third_party/2and3/markdown/extensions/def_list.pyi @@ -1,11 +1,11 @@ -from typing import Any +from typing import Any, Pattern from markdown.blockprocessors import BlockProcessor, ListIndentProcessor from markdown.extensions import Extension class DefListProcessor(BlockProcessor): - RE: Any - NO_INDENT_RE: Any + RE: Pattern + NO_INDENT_RE: Pattern def test(self, parent, block): ... def run(self, parent, blocks): ... diff --git a/third_party/2and3/markdown/extensions/fenced_code.pyi b/third_party/2and3/markdown/extensions/fenced_code.pyi index fbd96143dc94..9afedc4f2d08 100644 --- a/third_party/2and3/markdown/extensions/fenced_code.pyi +++ b/third_party/2and3/markdown/extensions/fenced_code.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.preprocessors import Preprocessor @@ -7,7 +7,7 @@ class FencedCodeExtension(Extension): def extendMarkdown(self, md) -> None: ... class FencedBlockPreprocessor(Preprocessor): - FENCED_BLOCK_RE: Any + FENCED_BLOCK_RE: Pattern CODE_WRAP: str = ... LANG_TAG: str = ... checked_for_codehilite: bool = ... diff --git a/third_party/2and3/markdown/extensions/footnotes.pyi b/third_party/2and3/markdown/extensions/footnotes.pyi index da869a86428f..5e8e50d54be3 100644 --- a/third_party/2and3/markdown/extensions/footnotes.pyi +++ b/third_party/2and3/markdown/extensions/footnotes.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.inlinepatterns import InlineProcessor @@ -8,8 +8,8 @@ from markdown.treeprocessors import Treeprocessor FN_BACKLINK_TEXT: Any NBSP_PLACEHOLDER: Any -DEF_RE: Any -TABBED_RE: Any +DEF_RE: Pattern +TABBED_RE: Pattern RE_REF_ID: Any class FootnoteExtension(Extension): diff --git a/third_party/2and3/markdown/extensions/legacy_attrs.pyi b/third_party/2and3/markdown/extensions/legacy_attrs.pyi index 4196fabd51a2..ab76addaa2ab 100644 --- a/third_party/2and3/markdown/extensions/legacy_attrs.pyi +++ b/third_party/2and3/markdown/extensions/legacy_attrs.pyi @@ -1,9 +1,9 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.treeprocessors import Treeprocessor -ATTR_RE: Any +ATTR_RE: Pattern class LegacyAttrs(Treeprocessor): def run(self, doc) -> None: ... diff --git a/third_party/2and3/markdown/extensions/meta.pyi b/third_party/2and3/markdown/extensions/meta.pyi index 22aa50071e30..5277a0347e99 100644 --- a/third_party/2and3/markdown/extensions/meta.pyi +++ b/third_party/2and3/markdown/extensions/meta.pyi @@ -1,13 +1,13 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.preprocessors import Preprocessor log: Any -META_RE: Any -META_MORE_RE: Any -BEGIN_RE: Any -END_RE: Any +META_RE: Pattern +META_MORE_RE: Pattern +BEGIN_RE: Pattern +END_RE: Pattern class MetaExtension(Extension): md: Any diff --git a/third_party/2and3/markdown/extensions/sane_lists.pyi b/third_party/2and3/markdown/extensions/sane_lists.pyi index 284a02e50cb5..bf274bfba68f 100644 --- a/third_party/2and3/markdown/extensions/sane_lists.pyi +++ b/third_party/2and3/markdown/extensions/sane_lists.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.blockprocessors import OListProcessor, UListProcessor from markdown.extensions import Extension @@ -6,12 +6,12 @@ from markdown.extensions import Extension class SaneOListProcessor(OListProcessor): SIBLING_TAGS: Any LAZY_OL: bool = ... - CHILD_RE: Any + CHILD_RE: Pattern def __init__(self, parser) -> None: ... class SaneUListProcessor(UListProcessor): SIBLING_TAGS: Any - CHILD_RE: Any + CHILD_RE: Pattern def __init__(self, parser) -> None: ... class SaneListExtension(Extension): diff --git a/third_party/2and3/markdown/extensions/smarty.pyi b/third_party/2and3/markdown/extensions/smarty.pyi index 6f4eb226e0df..3bbf0fde998b 100644 --- a/third_party/2and3/markdown/extensions/smarty.pyi +++ b/third_party/2and3/markdown/extensions/smarty.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.inlinepatterns import HtmlInlineProcessor @@ -21,7 +21,7 @@ closingSingleQuotesRegex: Any closingSingleQuotesRegex2: Any remainingSingleQuotesRegex: str remainingDoubleQuotesRegex: str -HTML_STRICT_RE: Any +HTML_STRICT_RE: str class SubstituteTextPattern(HtmlInlineProcessor): replace: Any diff --git a/third_party/2and3/markdown/extensions/toc.pyi b/third_party/2and3/markdown/extensions/toc.pyi index 7aae06cf9d12..cf4e92eadd53 100644 --- a/third_party/2and3/markdown/extensions/toc.pyi +++ b/third_party/2and3/markdown/extensions/toc.pyi @@ -1,11 +1,11 @@ -from typing import Any +from typing import Any, Pattern from markdown.extensions import Extension from markdown.treeprocessors import Treeprocessor def slugify(value, separator): ... -IDCOUNT_RE: Any +IDCOUNT_RE: Pattern def unique(id, ids): ... def get_name(el): ... diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi index e233e64f5b8c..a5095700a2de 100644 --- a/third_party/2and3/markdown/inlinepatterns.pyi +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -15,9 +15,9 @@ EM_STRONG2_RE: str STRONG_EM_RE: str STRONG_EM2_RE: str STRONG_EM3_RE: str -LINK_RE: Any +LINK_RE: str IMAGE_LINK_RE: str -REFERENCE_RE: Any +REFERENCE_RE: str IMAGE_REFERENCE_RE: str NOT_STRONG_RE: str AUTOLINK_RE: str @@ -115,7 +115,7 @@ class ImageInlineProcessor(LinkInlineProcessor): def handleMatch(self, m, data): ... # type: ignore class ReferenceInlineProcessor(LinkInlineProcessor): - NEWLINE_CLEANUP_RE: Any + NEWLINE_CLEANUP_RE: Pattern RE_LINK: Any def handleMatch(self, m, data): ... # type: ignore def evalId(self, data, index, text): ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi index fe276f35522e..a7ef53572ecb 100644 --- a/third_party/2and3/markdown/postprocessors.pyi +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from . import util @@ -15,6 +15,6 @@ class AndSubstitutePostprocessor(Postprocessor): def run(self, text): ... class UnescapePostprocessor(Postprocessor): - RE: Any + 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 61985d9da4ea..c29b6ab59623 100644 --- a/third_party/2and3/markdown/preprocessors.pyi +++ b/third_party/2and3/markdown/preprocessors.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Pattern from . import util @@ -21,6 +21,6 @@ class HtmlBlockPreprocessor(Preprocessor): class ReferencePreprocessor(Preprocessor): TITLE: str = ... - RE: Any - TITLE_RE: Any + RE: Pattern + TITLE_RE: Pattern def run(self, lines): ... diff --git a/third_party/2and3/markdown/util.pyi b/third_party/2and3/markdown/util.pyi index 521eed39f8d8..170fadf43494 100644 --- a/third_party/2and3/markdown/util.pyi +++ b/third_party/2and3/markdown/util.pyi @@ -1,5 +1,5 @@ from collections import namedtuple -from typing import Any, Optional +from typing import Any, Optional, Pattern PY37: Any __deprecated__: Any @@ -8,10 +8,10 @@ STX: str ETX: str INLINE_PLACEHOLDER_PREFIX: Any INLINE_PLACEHOLDER: Any -INLINE_PLACEHOLDER_RE: Any +INLINE_PLACEHOLDER_RE: Pattern AMP_SUBSTITUTE: Any HTML_PLACEHOLDER: Any -HTML_PLACEHOLDER_RE: Any +HTML_PLACEHOLDER_RE: Pattern TAG_PLACEHOLDER: Any INSTALLED_EXTENSIONS: Any RTL_BIDI_RANGES: Any