mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-08 21:15:17 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
1 parent
dde70aeecd
commit
622df68c1c
61 files changed
+188
-51
No files matched your search
@@ -13,7 +13,7 @@ from email._header_value_parser import (
|
||||
)
|
||||
from email.errors import MessageDefect
|
||||
from email.policy import Policy
|
||||
from typing import Any, ClassVar, Literal, Protocol
|
||||
from typing import Any, ClassVar, Literal, Protocol, type_check_only
|
||||
from typing_extensions import Self
|
||||
|
||||
class BaseHeader(str):
|
||||
@@ -137,6 +137,7 @@ class MessageIDHeader:
|
||||
@staticmethod
|
||||
def value_parser(value: str) -> MessageID: ...
|
||||
|
||||
@type_check_only
|
||||
class _HeaderParser(Protocol):
|
||||
max_count: ClassVar[Literal[1] | None]
|
||||
@staticmethod
|
||||
|
||||
Reference in new issue
Block a user