-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
markdown: add more stubs #4574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
markdown: add more stubs #4574
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from typing import Any | ||
|
||
__version_info__: Any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Any | ||
|
||
class State(list): | ||
def set(self, state) -> None: ... | ||
def reset(self) -> None: ... | ||
def isstate(self, state): ... | ||
|
||
class BlockParser: | ||
blockprocessors: Any | ||
state: Any | ||
md: Any | ||
def __init__(self, md) -> None: ... | ||
@property | ||
def markdown(self): ... | ||
root: Any | ||
def parseDocument(self, lines): ... | ||
def parseChunk(self, parent, text) -> None: ... | ||
def parseBlocks(self, parent, blocks) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
from typing import Any | ||
|
||
logger: Any | ||
|
||
def build_block_parser(md, **kwargs): ... | ||
|
||
class BlockProcessor: | ||
parser: Any | ||
tab_length: Any | ||
def __init__(self, parser) -> None: ... | ||
def lastChild(self, parent): ... | ||
def detab(self, text): ... | ||
def looseDetab(self, text, level: int = ...): ... | ||
def test(self, parent, block) -> None: ... | ||
def run(self, parent, blocks) -> None: ... | ||
|
||
class ListIndentProcessor(BlockProcessor): | ||
ITEM_TYPES: Any | ||
LIST_TYPES: Any | ||
INDENT_RE: 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, block): ... | ||
def run(self, parent, blocks) -> None: ... | ||
|
||
class BlockQuoteProcessor(BlockProcessor): | ||
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) -> 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) -> None: ... | ||
|
||
class HashHeaderProcessor(BlockProcessor): | ||
RE: Any | ||
def test(self, parent, block): ... | ||
def run(self, parent, blocks) -> None: ... | ||
|
||
class SetextHeaderProcessor(BlockProcessor): | ||
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, block): ... | ||
def run(self, parent, blocks) -> None: ... | ||
|
||
class EmptyBlockProcessor(BlockProcessor): | ||
def test(self, parent, block): ... | ||
def run(self, parent, blocks) -> None: ... | ||
|
||
class ParagraphProcessor(BlockProcessor): | ||
def test(self, parent, block): ... | ||
def run(self, parent, blocks) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.inlinepatterns import InlineProcessor | ||
from markdown.preprocessors import Preprocessor | ||
|
||
ABBR_REF_RE: Any | ||
|
||
class AbbrExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
class AbbrPreprocessor(Preprocessor): | ||
def run(self, lines): ... | ||
|
||
class AbbrInlineProcessor(InlineProcessor): | ||
title: Any | ||
def __init__(self, pattern, title) -> None: ... | ||
def handleMatch(self, m, data): ... # type: ignore | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Any | ||
|
||
from markdown.blockprocessors import BlockProcessor | ||
from markdown.extensions import Extension | ||
|
||
class AdmonitionExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
class AdmonitionProcessor(BlockProcessor): | ||
CLASSNAME: str = ... | ||
CLASSNAME_TITLE: str = ... | ||
RE: 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): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.treeprocessors import Treeprocessor | ||
|
||
def get_attrs(str): ... | ||
def isheader(elem): ... | ||
|
||
class AttrListTreeprocessor(Treeprocessor): | ||
BASE_RE: str = ... | ||
HEADER_RE: 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) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from typing import Any, Optional | ||
|
||
from markdown.extensions import Extension | ||
from markdown.treeprocessors import Treeprocessor | ||
|
||
pygments: bool | ||
|
||
def parse_hl_lines(expr): ... | ||
|
||
class CodeHilite: | ||
src: Any | ||
lang: Any | ||
linenums: Any | ||
guess_lang: Any | ||
css_class: Any | ||
style: Any | ||
noclasses: Any | ||
tab_length: Any | ||
hl_lines: Any | ||
use_pygments: Any | ||
def __init__( | ||
self, | ||
src: Optional[Any] = ..., | ||
linenums: Optional[Any] = ..., | ||
guess_lang: bool = ..., | ||
css_class: str = ..., | ||
lang: Optional[Any] = ..., | ||
style: str = ..., | ||
noclasses: bool = ..., | ||
tab_length: int = ..., | ||
hl_lines: Optional[Any] = ..., | ||
use_pygments: bool = ..., | ||
) -> None: ... | ||
def hilite(self): ... | ||
|
||
class HiliteTreeprocessor(Treeprocessor): | ||
def code_unescape(self, text): ... | ||
def run(self, root) -> None: ... | ||
|
||
class CodeHiliteExtension(Extension): | ||
config: Any | ||
def __init__(self, **kwargs) -> None: ... | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from typing import Any | ||
|
||
from markdown.blockprocessors import BlockProcessor, ListIndentProcessor | ||
from markdown.extensions import Extension | ||
|
||
class DefListProcessor(BlockProcessor): | ||
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, block) -> None: ... | ||
|
||
class DefListExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
|
||
extensions: Any | ||
|
||
class ExtraExtension(Extension): | ||
config: Any | ||
def __init__(self, **kwargs) -> None: ... | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.preprocessors import Preprocessor | ||
|
||
class FencedCodeExtension(Extension): | ||
def extendMarkdown(self, md) -> 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) -> None: ... | ||
def run(self, lines): ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.inlinepatterns import InlineProcessor | ||
from markdown.postprocessors import Postprocessor | ||
from markdown.preprocessors import Preprocessor | ||
from markdown.treeprocessors import Treeprocessor | ||
|
||
FN_BACKLINK_TEXT: Any | ||
NBSP_PLACEHOLDER: Any | ||
DEF_RE: 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) -> None: ... | ||
parser: Any | ||
md: Any | ||
def extendMarkdown(self, md) -> None: ... | ||
footnotes: Any | ||
def reset(self) -> None: ... | ||
def unique_ref(self, reference, found: bool = ...): ... | ||
def findFootnotesPlaceholder(self, root): ... | ||
def setFootnote(self, id, text) -> None: ... | ||
def get_separator(self): ... | ||
def makeFootnoteId(self, id): ... | ||
def makeFootnoteRefId(self, id, found: bool = ...): ... | ||
def makeFootnotesDiv(self, root): ... | ||
|
||
class FootnotePreprocessor(Preprocessor): | ||
footnotes: Any | ||
def __init__(self, footnotes) -> None: ... | ||
def run(self, lines): ... | ||
def detectTabbed(self, lines): ... | ||
|
||
class FootnoteInlineProcessor(InlineProcessor): | ||
footnotes: Any | ||
def __init__(self, pattern, footnotes) -> None: ... | ||
def handleMatch(self, m, data): ... # type: ignore | ||
|
||
class FootnotePostTreeprocessor(Treeprocessor): | ||
footnotes: Any | ||
def __init__(self, footnotes) -> None: ... | ||
def add_duplicates(self, li, duplicates) -> None: ... | ||
def get_num_duplicates(self, li): ... | ||
def handle_duplicates(self, parent) -> None: ... | ||
offset: int = ... | ||
def run(self, root) -> None: ... | ||
|
||
class FootnoteTreeprocessor(Treeprocessor): | ||
footnotes: Any | ||
def __init__(self, footnotes) -> None: ... | ||
def run(self, root) -> None: ... | ||
|
||
class FootnotePostprocessor(Postprocessor): | ||
footnotes: Any | ||
def __init__(self, footnotes) -> None: ... | ||
def run(self, text): ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.treeprocessors import Treeprocessor | ||
|
||
ATTR_RE: Any | ||
|
||
class LegacyAttrs(Treeprocessor): | ||
def run(self, doc) -> None: ... | ||
def handleAttributes(self, el, txt): ... | ||
|
||
class LegacyAttrExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from markdown.extensions import Extension | ||
from markdown.inlinepatterns import UnderscoreProcessor | ||
|
||
EMPHASIS_RE: str | ||
STRONG_RE: str | ||
STRONG_EM_RE: str | ||
|
||
class LegacyUnderscoreProcessor(UnderscoreProcessor): | ||
PATTERNS: Any | ||
|
||
class LegacyEmExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from typing import Any, Optional | ||
|
||
from markdown.blockprocessors import BlockProcessor | ||
from markdown.extensions import Extension | ||
|
||
class MarkdownInHtmlProcessor(BlockProcessor): | ||
def test(self, parent, block): ... | ||
def run(self, parent, blocks, tail: Optional[Any] = ..., nest: bool = ...) -> None: ... | ||
|
||
class MarkdownInHtmlExtension(Extension): | ||
def extendMarkdown(self, md) -> None: ... | ||
|
||
def makeExtension(**kwargs): ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is a
Pattern
?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the changes. Not all of them are Pattern, see 8f2c0c5