mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Create stubs for the secrets module in Python 3.6
This commit is contained in:
committed by
Łukasz Langa
parent
61cdd4b7ae
commit
5f98dbb4bf
14
stdlib/3.6/secrets.pyi
Normal file
14
stdlib/3.6/secrets.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
# Stubs for secrets (Python 3.6)
|
||||
|
||||
from typing import Optional, Sequence, TypeVar
|
||||
from hmac import compare_digest as compare_digest
|
||||
from random import SystemRandom as SystemRandom
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def randbelow(exclusive_upper_bound: int) -> int: ...
|
||||
def randbits(k: int) -> int: ...
|
||||
def choice(seq: Sequence[_T]) -> _T: ...
|
||||
def token_bytes(nbytes: Optional[int]) -> bytes: ...
|
||||
def token_hex(nbytes: Optional[int]) -> str: ...
|
||||
def token_urlsafe(nbytes: Optional[int]) -> str: ...
|
||||
Reference in New Issue
Block a user