mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 13:22:11 +08:00
Miscellaneous type_check_only annotations (#13058)
This commit is contained in:
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user