Add @type_check_only to stub-only private classes in stdlib, round 2 (#15515)

This commit is contained in:
Brian Schubert
2026-03-15 16:31:02 -04:00
committed by GitHub
parent eca2ee5e33
commit 2839fd5734
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -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