mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-08 17:39:20 +08:00
Add @type_check_only to stub-only private classes in stdlib, round 2 (#15515)
This commit is contained in:
@@ -10,7 +10,7 @@ from importlib.abc import MetaPathFinder
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, Generic, NamedTuple, TypeVar, overload
|
||||
from typing import Any, ClassVar, Generic, NamedTuple, TypeVar, overload, type_check_only
|
||||
from typing_extensions import Self, TypeAlias, deprecated, disjoint_base
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -54,6 +54,7 @@ elif sys.version_info >= (3, 11):
|
||||
|
||||
_EntryPointBase = DeprecatedTuple
|
||||
else:
|
||||
@type_check_only
|
||||
class _EntryPointBase(NamedTuple):
|
||||
name: str
|
||||
value: str
|
||||
|
||||
Reference in New Issue
Block a user