Update stubs for Crypto.Random (#3546)

This commit is contained in:
abe
2019-12-19 21:26:51 +00:00
committed by Sebastian Rittau
parent a705d59479
commit f7119c30ce
2 changed files with 20 additions and 14 deletions

View File

@@ -1 +1,5 @@
def new(*args, **kwargs): ...
from typing import Any
def new(*args: Any, **kwargs: Any): ...
def atfork() -> None: ...
def get_random_bytes(n: int) -> bytes: ...

View File

@@ -1,17 +1,19 @@
from typing import Any, Optional
from typing import Any, List, Optional, Sequence, TypeVar
_T = TypeVar('_T')
class StrongRandom:
def __init__(self, rng: Optional[Any] = ..., randfunc: Optional[Any] = ...) -> None: ...
def getrandbits(self, k): ...
def randrange(self, *args): ...
def randint(self, a, b): ...
def choice(self, seq): ...
def shuffle(self, x): ...
def sample(self, population, k): ...
def getrandbits(self, k: int) -> int: ...
def randrange(self, *args: int) -> int: ...
def randint(self, a: int, b: int) -> int: ...
def choice(self, seq: Sequence[_T]) -> _T: ...
def shuffle(self, x: Sequence[Any]): ...
def sample(self, population: Sequence[_T], k: int) -> List[_T]: ...
getrandbits: Any
randrange: Any
randint: Any
choice: Any
shuffle: Any
sample: Any
def getrandbits(k: int) -> int: ...
def randrange(*args: int) -> int: ...
def randint(a: int, b: int) -> int: ...
def choice(seq: Sequence[_T]) -> _T: ...
def shuffle(x: Sequence[Any]): ...
def sample(population: Sequence[_T], k: int) -> List[_T]: ...