Miscellaneous type_check_only annotations (#13058)

This commit is contained in:
Stephen Morton authored and GitHub committed 2024-11-21 08:41:38 +00:00
1 parent ae7f6ea59c
commit 0fb3a092c7
4 files changed
+12 -4

No files matched your search

+3 -1
View File
@@ -2,7 +2,7 @@ import sys
from _typeshed import StrOrBytesPath
from collections.abc import Iterator, MutableMapping
from types import TracebackType
from typing import Literal
from typing import Literal, type_check_only
from typing_extensions import Self, TypeAlias
__all__ = ["open", "whichdb", "error"]
@@ -89,6 +89,8 @@ class _Database(MutableMapping[_KeyType, bytes]):
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
# This class is not exposed. It calls itself dbm.error.
@type_check_only
class _error(Exception): ...
error: tuple[type[_error], type[OSError]]