mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
from types import ModuleType
|
||||
from typing import Any, AnyStr, Callable, Optional, Union, overload
|
||||
from typing import Any, AnyStr, Callable, Union, overload
|
||||
|
||||
# TODO more precise type for object of hashlib
|
||||
_Hash = Any
|
||||
@@ -8,10 +8,10 @@ _DigestMod = Union[str, Callable[[], _Hash], ModuleType]
|
||||
|
||||
digest_size: None
|
||||
|
||||
def new(key: bytes, msg: Optional[ReadableBuffer] = ..., digestmod: Optional[_DigestMod] = ...) -> HMAC: ...
|
||||
def new(key: bytes, msg: ReadableBuffer | None = ..., digestmod: _DigestMod | None = ...) -> HMAC: ...
|
||||
|
||||
class HMAC:
|
||||
def __init__(self, key: bytes, msg: Optional[ReadableBuffer] = ..., digestmod: _DigestMod = ...) -> None: ...
|
||||
def __init__(self, key: bytes, msg: ReadableBuffer | None = ..., digestmod: _DigestMod = ...) -> None: ...
|
||||
def update(self, msg: ReadableBuffer) -> None: ...
|
||||
def digest(self) -> bytes: ...
|
||||
def hexdigest(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user