diff --git a/stubs/Markdown/METADATA.toml b/stubs/Markdown/METADATA.toml index a84da2a3e..7a3571b51 100644 --- a/stubs/Markdown/METADATA.toml +++ b/stubs/Markdown/METADATA.toml @@ -1,4 +1,4 @@ -version = "3.5.*" +version = "3.6.*" upstream_repository = "https://github.com/Python-Markdown/markdown" partial_stub = true diff --git a/stubs/Markdown/markdown/extensions/attr_list.pyi b/stubs/Markdown/markdown/extensions/attr_list.pyi index 7602fd771..0a837e583 100644 --- a/stubs/Markdown/markdown/extensions/attr_list.pyi +++ b/stubs/Markdown/markdown/extensions/attr_list.pyi @@ -4,6 +4,7 @@ from xml.etree.ElementTree import Element from markdown.extensions import Extension from markdown.treeprocessors import Treeprocessor +def get_attrs_and_remainder(attrs_string: str) -> tuple[list[tuple[str, str]], str]: ... def get_attrs(str: str) -> list[tuple[str, str]]: ... def isheader(elem: Element) -> bool: ... @@ -14,7 +15,7 @@ class AttrListTreeprocessor(Treeprocessor): INLINE_RE: Pattern[str] NAME_RE: Pattern[str] def run(self, doc: Element) -> None: ... - def assign_attrs(self, elem: Element, attrs: str) -> None: ... + def assign_attrs(self, elem: Element, attrs_string: str, *, strict: bool = False) -> str: ... def sanitize_name(self, name: str) -> str: ... class AttrListExtension(Extension): ... diff --git a/stubs/Markdown/markdown/extensions/toc.pyi b/stubs/Markdown/markdown/extensions/toc.pyi index 44084e237..65efb86bf 100644 --- a/stubs/Markdown/markdown/extensions/toc.pyi +++ b/stubs/Markdown/markdown/extensions/toc.pyi @@ -1,6 +1,7 @@ from collections.abc import Iterator, MutableSet from re import Pattern from typing import Any, TypedDict +from typing_extensions import deprecated from xml.etree.ElementTree import Element from markdown.core import Markdown @@ -20,9 +21,16 @@ class _TocToken(_FlatTocToken): def slugify(value: str, separator: str, unicode: bool = False) -> str: ... def slugify_unicode(value: str, separator: str) -> str: ... def unique(id: str, ids: MutableSet[str]) -> str: ... +@deprecated("Use `render_inner_html` and `striptags` instead.") def get_name(el: Element) -> str: ... +@deprecated("Use `run_postprocessors`, `render_inner_html` and/or `striptags` instead.") def stashedHTML2text(text: str, md: Markdown, strip_entities: bool = True) -> str: ... def unescape(text: str) -> str: ... +def strip_tags(text: str) -> str: ... +def escape_cdata(text: str) -> str: ... +def run_postprocessors(text: str, md: Markdown) -> str: ... +def render_inner_html(el: Element, md: Markdown) -> str: ... +def remove_fnrefs(root: Element) -> Element: ... def nest_toc_tokens(toc_list: list[_FlatTocToken]) -> list[_TocToken]: ... class TocTreeprocessor(Treeprocessor):