From dd98e31ad6f9e33f351d47246d6d09c804ba8c29 Mon Sep 17 00:00:00 2001 From: lovetox Date: Fri, 20 May 2022 14:44:59 +0200 Subject: Add inline type annotations (#1089) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * crypto: Add type annotations * Don’t redefine var mypy complains about the redefinition * _util: Add type annotations * rand: Add type annotations * Prepare package & CI for running mypy * fix toxenv name Co-authored-by: Maximilian Hils --- src/OpenSSL/rand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/OpenSSL/rand.py') diff --git a/src/OpenSSL/rand.py b/src/OpenSSL/rand.py index d2c1767..a4aa721 100644 --- a/src/OpenSSL/rand.py +++ b/src/OpenSSL/rand.py @@ -5,7 +5,7 @@ PRNG management routines, thin wrappers. from OpenSSL._util import lib as _lib -def add(buffer, entropy): +def add(buffer: bytes, entropy: int) -> None: """ Mix bytes from *string* into the PRNG state. @@ -31,7 +31,7 @@ def add(buffer, entropy): _lib.RAND_add(buffer, len(buffer), entropy) -def status(): +def status() -> int: """ Check whether the PRNG has been seeded with enough data. -- cgit v1.2.1