@@ -3,8 +3,8 @@ import sys
33from _typeshed import SupportsLenAndGetItem
44from collections .abc import Callable , Iterable , MutableSequence , Sequence , Set as AbstractSet
55from fractions import Fraction
6- from typing import Any , ClassVar , NoReturn , TypeVar
7- from typing_extensions import Self
6+ from typing import Any , ClassVar , NoReturn , TypeVar , overload
7+ from typing_extensions import Self , deprecated
88
99__all__ = [
1010 "Random" ,
@@ -67,6 +67,10 @@ class Random(_random.Random):
6767 if sys .version_info >= (3 , 11 ):
6868 def shuffle (self , x : MutableSequence [Any ]) -> None : ...
6969 else :
70+ @overload
71+ def shuffle (self , x : MutableSequence [Any ]) -> None : ...
72+ @overload
73+ @deprecated ("The `random` parameter is deprecated since Python 3.9; removed in Python 3.11." )
7074 def shuffle (self , x : MutableSequence [Any ], random : Callable [[], float ] | None = None ) -> None : ...
7175 if sys .version_info >= (3 , 11 ):
7276 def sample (self , population : Sequence [_T ], k : int , * , counts : Iterable [int ] | None = None ) -> list [_T ]: ...
0 commit comments