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

This commit is contained in:
Brian Schubert authored and GitHub committed 2025-08-03 10:13:16 +02:00
1 parent dde70aeecd
commit 622df68c1c
61 files changed
+188 -51

No files matched your search

+2
View File
@@ -419,6 +419,7 @@ def type_check_only(func_or_cls: _FT) -> _FT: ...
# Type aliases and type constructors
@type_check_only
class _Alias:
# Class for defining generic aliases for library types.
def __getitem__(self, typeargs: Any) -> Any: ...
@@ -1125,6 +1126,7 @@ if sys.version_info >= (3, 13):
def is_protocol(tp: type, /) -> bool: ...
def get_protocol_members(tp: type, /) -> frozenset[str]: ...
@final
@type_check_only
class _NoDefaultType: ...
NoDefault: _NoDefaultType