mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-01 21:50:21 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
+2
-1
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user