mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Iterator, MutableMapping, Type, Union
|
||||
from typing import Iterator, MutableMapping, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
_KeyType = Union[str, bytes]
|
||||
@@ -82,12 +82,12 @@ class _Database(MutableMapping[_KeyType, bytes]):
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class _error(Exception): ...
|
||||
|
||||
error: tuple[Type[_error], Type[OSError]]
|
||||
error: tuple[type[_error], type[OSError]]
|
||||
|
||||
def whichdb(filename: str) -> str: ...
|
||||
def open(file: str, flag: _TFlags = ..., mode: int = ...) -> _Database: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Iterator, MutableMapping, Type, Union
|
||||
from typing import Iterator, MutableMapping, Union
|
||||
|
||||
_KeyType = Union[str, bytes]
|
||||
_ValueType = Union[str, bytes]
|
||||
@@ -20,7 +20,7 @@ class _Database(MutableMapping[_KeyType, bytes]):
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def open(file: str, flag: str = ..., mode: int = ...) -> _Database: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Type, TypeVar, Union, overload
|
||||
from typing import TypeVar, Union, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_KeyType = Union[str, bytes]
|
||||
@@ -24,7 +24,7 @@ class _gdbm:
|
||||
def __len__(self) -> int: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@overload
|
||||
def get(self, k: _KeyType) -> bytes | None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Type, TypeVar, Union, overload
|
||||
from typing import TypeVar, Union, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_KeyType = Union[str, bytes]
|
||||
@@ -20,7 +20,7 @@ class _dbm:
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@overload
|
||||
def get(self, k: _KeyType) -> bytes | None: ...
|
||||
|
||||
Reference in New Issue
Block a user