mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-23 00:20:31 +08:00
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from collections.abc import Iterator, MutableSet
|
||||
from re import Pattern
|
||||
from typing import Any, TypedDict
|
||||
from typing import Any, TypedDict, type_check_only
|
||||
from typing_extensions import deprecated
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
@@ -10,11 +10,13 @@ from markdown.treeprocessors import Treeprocessor
|
||||
|
||||
IDCOUNT_RE: Pattern[str]
|
||||
|
||||
@type_check_only
|
||||
class _FlatTocToken(TypedDict):
|
||||
level: int
|
||||
id: str
|
||||
name: str
|
||||
|
||||
@type_check_only
|
||||
class _TocToken(_FlatTocToken):
|
||||
children: list[_TocToken]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from re import Pattern
|
||||
from typing import Final, Generic, TypedDict, TypeVar, overload
|
||||
from typing import Final, Generic, TypedDict, TypeVar, overload, type_check_only
|
||||
|
||||
from markdown.core import Markdown
|
||||
|
||||
@@ -40,6 +40,7 @@ class Processor:
|
||||
md: Markdown
|
||||
def __init__(self, md: Markdown | None = None) -> None: ...
|
||||
|
||||
@type_check_only
|
||||
class _TagData(TypedDict):
|
||||
tag: str
|
||||
attrs: dict[str, str]
|
||||
|
||||
Reference in New Issue
Block a user