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

This commit is contained in:
Brian Schubert
2025-08-03 10:13:16 +02:00
committed by GitHub
parent dde70aeecd
commit 622df68c1c
61 changed files with 188 additions and 51 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import sys
from _typeshed import ReadOnlyBuffer, StrOrBytesPath
from types import TracebackType
from typing import TypeVar, overload
from typing import TypeVar, overload, type_check_only
from typing_extensions import Self, TypeAlias
if sys.platform != "win32":
@@ -13,6 +13,7 @@ if sys.platform != "win32":
class error(OSError): ...
# Actual typename gdbm, not exposed by the implementation
@type_check_only
class _gdbm:
def firstkey(self) -> bytes | None: ...
def nextkey(self, key: _KeyType) -> bytes | None: ...