Skip to content

Commit 145a853

Browse files
authored
random: update for py311 (#7651)
1 parent 520f807 commit 145a853

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/random.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ class Random(_random.Random):
8989
cum_weights: Sequence[float | Fraction] | None = ...,
9090
k: int = ...,
9191
) -> list[_T]: ...
92-
def shuffle(self, x: MutableSequence[Any], random: Callable[[], float] | None = ...) -> None: ...
92+
if sys.version_info >= (3, 11):
93+
def shuffle(self, x: MutableSequence[Any]) -> None: ...
94+
else:
95+
def shuffle(self, x: MutableSequence[Any], random: Callable[[], float] | None = ...) -> None: ...
9396
if sys.version_info >= (3, 11):
9497
def sample(self, population: Sequence[_T], k: int, *, counts: Iterable[int] | None = ...) -> list[_T]: ...
9598
elif sys.version_info >= (3, 9):

0 commit comments

Comments
 (0)