mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Update stubs for Crypto.Random (#3546)
This commit is contained in:
6
third_party/2and3/Crypto/Random/__init__.pyi
vendored
6
third_party/2and3/Crypto/Random/__init__.pyi
vendored
@@ -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: ...
|
||||
|
||||
28
third_party/2and3/Crypto/Random/random.pyi
vendored
28
third_party/2and3/Crypto/Random/random.pyi
vendored
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user