Repository navigation
Commit 4fcff94
committed
[Markdown] Add toc.unique's counters parameter and DelimiterProcessor.rule_of_3
Markdown 3.11.3 gave `unique()` an optional `counters` cache and
`DelimiterProcessor` a static `rule_of_3()`; neither is in the stubs, so
today's daily stubtest run reported both.
Verified against the installed package: `inspect.signature(toc.unique)` is
`(id: str, ids: MutableSet[str], counters: dict[str, int] | None = None) -> str`,
and `rule_of_3` is a `staticmethod` with `(opener: int, closer: int) -> bool`.
stubtest reproduces the two errors from the issue without this change and is
clean with it; `tests/mypy_test.py stubs/Markdown` passes on 3.10-3.13.
Closes #167091 parent 64c9da7 commit 4fcff94
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
0 commit comments