Add @type_check_only to stub-only private classes in stdlib (#14512)

This commit is contained in:
Brian Schubert
2025-08-03 04:13:16 -04:00
committed by GitHub
parent dde70aeecd
commit 622df68c1c
61 changed files with 188 additions and 51 deletions
+2 -1
View File
@@ -7,7 +7,7 @@ from collections.abc import Callable, Container, Iterable, Mapping, Sequence, Se
from contextlib import AbstractContextManager
from re import Pattern
from types import GenericAlias, TracebackType
from typing import Any, AnyStr, Final, Generic, NoReturn, Protocol, SupportsAbs, SupportsRound, TypeVar, overload
from typing import Any, AnyStr, Final, Generic, NoReturn, Protocol, SupportsAbs, SupportsRound, TypeVar, overload, type_check_only
from typing_extensions import Never, ParamSpec, Self
from unittest._log import _AssertLogsContext, _LoggingWatcher
from warnings import WarningMessage
@@ -56,6 +56,7 @@ def skipUnless(condition: object, reason: str) -> Callable[[_FT], _FT]: ...
class SkipTest(Exception):
def __init__(self, reason: str) -> None: ...
@type_check_only
class _SupportsAbsAndDunderGE(SupportsDunderGE[Any], SupportsAbs[Any], Protocol): ...
class TestCase: