Skip to content

Commit 5f98dbb

Browse files
kdelwatambv
authored andcommitted
Create stubs for the secrets module in Python 3.6
1 parent 61cdd4b commit 5f98dbb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

stdlib/3.6/secrets.pyi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Stubs for secrets (Python 3.6)
2+
3+
from typing import Optional, Sequence, TypeVar
4+
from hmac import compare_digest as compare_digest
5+
from random import SystemRandom as SystemRandom
6+
7+
_T = TypeVar('_T')
8+
9+
def randbelow(exclusive_upper_bound: int) -> int: ...
10+
def randbits(k: int) -> int: ...
11+
def choice(seq: Sequence[_T]) -> _T: ...
12+
def token_bytes(nbytes: Optional[int]) -> bytes: ...
13+
def token_hex(nbytes: Optional[int]) -> str: ...
14+
def token_urlsafe(nbytes: Optional[int]) -> str: ...

0 commit comments

Comments
 (0)