Skip to content

Commit 8307b3c

Browse files
sobolevnpre-commit-ci[bot]srittauJelleZijlstra
authored
Bump Markdown to 3.7.* (#12565)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 7f38b11 commit 8307b3c

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Deprecated types are infered as functions:
2+
markdown.extensions.abbr.AbbrPreprocessor
3+
markdown.extensions.abbr.AbbrInlineProcessor

stubs/Markdown/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.6.*"
1+
version = "3.7.*"
22
upstream_repository = "https://github.com/Python-Markdown/markdown"
33
partial_stub = true
44

stubs/Markdown/markdown/extensions/abbr.pyi

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
11
from re import Pattern
22
from typing import ClassVar
3+
from typing_extensions import deprecated
4+
from xml.etree.ElementTree import Element
35

6+
from markdown.blockparser import BlockParser
47
from markdown.blockprocessors import BlockProcessor
8+
from markdown.core import Markdown
59
from markdown.extensions import Extension
610
from markdown.inlinepatterns import InlineProcessor
11+
from markdown.treeprocessors import Treeprocessor
712

8-
class AbbrExtension(Extension): ...
13+
class AbbrExtension(Extension):
14+
def reset(self) -> None: ...
15+
def reset_glossary(self) -> None: ...
16+
def load_glossary(self, dictionary: dict[str, str]) -> None: ...
917

10-
class AbbrPreprocessor(BlockProcessor):
18+
class AbbrTreeprocessor(Treeprocessor):
19+
RE: Pattern[str] | None
20+
abbrs: dict[str, str]
21+
def __init__(self, md: Markdown | None = None, abbrs: dict[str, str] | None = None) -> None: ...
22+
def iter_element(self, el: Element, parent: Element | None = None) -> None: ...
23+
24+
# Techinically it is the same type as `AbbrPreprocessor` just not deprecated.
25+
class AbbrBlockprocessor(BlockProcessor):
1126
RE: ClassVar[Pattern[str]]
27+
abbrs: dict[str, str]
28+
def __init__(self, parser: BlockParser, abbrs: dict[str, str]) -> None: ...
29+
30+
@deprecated("This class will be removed in the future; use `AbbrTreeprocessor` instead.")
31+
class AbbrPreprocessor(AbbrBlockprocessor): ...
1232

33+
@deprecated("This class will be removed in the future; use `AbbrTreeprocessor` instead.")
1334
class AbbrInlineProcessor(InlineProcessor):
1435
title: str
1536
def __init__(self, pattern: str, title: str) -> None: ...

0 commit comments

Comments
 (0)