-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More permissive type for random.choice and related functions (#6562)
- Loading branch information
1 parent
74ecc29
commit 943dc5f
Showing
2 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
from _typeshed import SupportsLenAndGetItem | ||
from hmac import compare_digest as compare_digest | ||
from random import SystemRandom as SystemRandom | ||
from typing import Sequence, TypeVar | ||
from typing import TypeVar | ||
|
||
_T = TypeVar("_T") | ||
|
||
def randbelow(exclusive_upper_bound: int) -> int: ... | ||
def randbits(k: int) -> int: ... | ||
def choice(seq: Sequence[_T]) -> _T: ... | ||
def choice(seq: SupportsLenAndGetItem[_T]) -> _T: ... | ||
def token_bytes(nbytes: int | None = ...) -> bytes: ... | ||
def token_hex(nbytes: int | None = ...) -> str: ... | ||
def token_urlsafe(nbytes: int | None = ...) -> str: ... |