add (overwrite with) mypy stubs, if available

This commit is contained in:
Matthias Kramm
2015-09-30 07:36:12 -07:00
parent 69e10b3aed
commit 337abed05a
432 changed files with 22360 additions and 776 deletions

25
stdlib/3/hashlib.pyi Normal file
View File

@@ -0,0 +1,25 @@
# Stubs for hashlib
# NOTE: These are incomplete!
from abc import abstractmethod, ABCMeta
import typing
class Hash(metaclass=ABCMeta):
@abstractmethod
def update(self, arg: bytes) -> None: ...
@abstractmethod
def digest(self) -> bytes: ...
@abstractmethod
def hexdigest(self) -> str: ...
@abstractmethod
def copy(self) -> 'Hash': ...
def md5(arg: bytes = None) -> Hash: ...
def sha1(arg: bytes = None) -> Hash: ...
def sha224(arg: bytes = None) -> Hash: ...
def sha256(arg: bytes = None) -> Hash: ...
def sha384(arg: bytes = None) -> Hash: ...
def sha512(arg: bytes = None) -> Hash: ...
def new(name: str, data: bytes = None) -> Hash: ...