mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 17:54:01 +08:00
Introduce the _HashObject protocol (#13553)
This protocol corresponds to what is called "hash object" in the hashlib documentation. In particular, it includes the non-OpenSSL BLAKE2 implementations which do not inherit HASH.
This commit is contained in:
+2
-2
@@ -1,12 +1,12 @@
|
||||
import sys
|
||||
from _hashlib import HASH as _HashlibHash
|
||||
from _hashlib import _HashObject
|
||||
from _typeshed import ReadableBuffer, SizedBuffer
|
||||
from collections.abc import Callable
|
||||
from types import ModuleType
|
||||
from typing import AnyStr, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_DigestMod: TypeAlias = str | Callable[[], _HashlibHash] | ModuleType
|
||||
_DigestMod: TypeAlias = str | Callable[[], _HashObject] | ModuleType
|
||||
|
||||
trans_5C: bytes
|
||||
trans_36: bytes
|
||||
|
||||
Reference in New Issue
Block a user