Add defaults for third-party stubs M-O (#9956)

This commit is contained in:
Alex Waygood
2023-03-27 18:20:30 +01:00
committed by GitHub
parent af884b236b
commit bb7c376142
66 changed files with 407 additions and 383 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ class BlockProcessor:
tab_length: int
def __init__(self, parser: BlockParser) -> None: ...
def lastChild(self, parent: Element) -> Element | None: ...
def detab(self, text: str, length: int | None = ...) -> tuple[str, str]: ...
def looseDetab(self, text: str, level: int = ...) -> str: ...
def detab(self, text: str, length: int | None = None) -> tuple[str, str]: ...
def looseDetab(self, text: str, level: int = 1) -> str: ...
def test(self, parent: Element, block: str) -> bool: ...
def run(self, parent: Element, blocks: list[str]) -> bool | None: ...
+1 -1
View File
@@ -49,7 +49,7 @@ class Markdown:
def is_block_level(self, tag: str) -> bool: ...
def convert(self, source: str) -> str: ...
def convertFile(
self, input: str | _ReadableStream | None = ..., output: str | _WritableStream | None = ..., encoding: str | None = ...
self, input: str | _ReadableStream | None = None, output: str | _WritableStream | None = None, encoding: str | None = None
) -> Markdown: ...
def markdown(
@@ -6,7 +6,7 @@ from markdown.core import Markdown
class Extension:
config: Mapping[str, list[Any]] = ...
def __init__(self, **kwargs: Any) -> None: ...
def getConfig(self, key: str, default: Any = ...) -> Any: ...
def getConfig(self, key: str, default: Any = "") -> Any: ...
def getConfigs(self) -> dict[str, Any]: ...
def getConfigInfo(self) -> list[tuple[str, str]]: ...
def setConfig(self, key: str, value: Any) -> None: ...
@@ -35,7 +35,7 @@ class CodeHilite:
use_pygments: bool = ...,
**options: Any,
) -> None: ...
def hilite(self, shebang: bool = ...) -> str: ...
def hilite(self, shebang: bool = True) -> str: ...
class HiliteTreeprocessor(Treeprocessor):
def code_unescape(self, text): ...
@@ -23,12 +23,12 @@ class FootnoteExtension(Extension):
md: Markdown
footnotes: Any
def reset(self) -> None: ...
def unique_ref(self, reference, found: bool = ...): ...
def unique_ref(self, reference, found: bool = False): ...
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 makeFootnoteRefId(self, id, found: bool = False): ...
def makeFootnotesDiv(self, root): ...
class FootnotePreprocessor(Preprocessor):
+1 -1
View File
@@ -11,7 +11,7 @@ IDCOUNT_RE: Pattern[str]
def unique(id, ids): ...
def get_name(el): ...
def stashedHTML2text(text, md, strip_entities: bool = ...): ...
def stashedHTML2text(text, md, strip_entities: bool = True): ...
def unescape(text): ...
def nest_toc_tokens(toc_list): ...
+2 -2
View File
@@ -40,7 +40,7 @@ class Pattern:
pattern: Any
compiled_re: Any
md: Markdown
def __init__(self, pattern, md: Markdown | None = ...) -> None: ...
def __init__(self, pattern, md: Markdown | None = None) -> None: ...
def getCompiledRegExp(self): ...
def handleMatch(self, m: Match[str]) -> str | Element | None: ...
def type(self): ...
@@ -48,7 +48,7 @@ class Pattern:
class InlineProcessor(Pattern):
safe_mode: bool = ...
def __init__(self, pattern, md: Markdown | None = ...) -> None: ...
def __init__(self, pattern, md: Markdown | None = None) -> None: ...
def handleMatch(self, m: Match[str], data) -> tuple[Element, int, int] | tuple[None, None, None]: ... # type: ignore[override]
class SimpleTextPattern(Pattern): ...
+1 -1
View File
@@ -17,7 +17,7 @@ class InlineProcessor(Treeprocessor):
def __init__(self, md) -> None: ...
stashed_nodes: Any
parent_map: Any
def run(self, tree: Element, ancestors: Incomplete | None = ...) -> Element: ...
def run(self, tree: Element, ancestors: Incomplete | None = None) -> Element: ...
class PrettifyTreeprocessor(Treeprocessor): ...
+4 -4
View File
@@ -15,8 +15,8 @@ HTML_PLACEHOLDER_RE: Pattern[str]
TAG_PLACEHOLDER: Any
RTL_BIDI_RANGES: Any
def deprecated(message: str, stacklevel: int = ...): ...
def parseBoolValue(value: object, fail_on_errors: bool = ..., preserve_none: bool = ...) -> bool | None: ...
def deprecated(message: str, stacklevel: int = 2): ...
def parseBoolValue(value: object, fail_on_errors: bool = True, preserve_none: bool = False) -> bool | None: ...
def code_escape(text: str) -> str: ...
def nearing_recursion_limit() -> bool: ...
@@ -24,7 +24,7 @@ class AtomicString(str): ...
class Processor:
md: Markdown
def __init__(self, md: Markdown | None = ...) -> None: ...
def __init__(self, md: Markdown | None = None) -> None: ...
class HtmlStash:
html_counter: int = ...
@@ -48,4 +48,4 @@ class Registry:
def __len__(self) -> int: ...
def get_index_for_name(self, name: str) -> int: ...
def register(self, item: Any, name: str, priority: float) -> None: ...
def deregister(self, name: str, strict: bool = ...) -> None: ...
def deregister(self, name: str, strict: bool = True) -> None: ...