We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 459c328 commit 36afde9Copy full SHA for 36afde9
stdlib/random.pyi
@@ -41,7 +41,10 @@ _T = TypeVar("_T")
41
42
class Random(_random.Random):
43
VERSION: ClassVar[int]
44
- def __init__(self, x: Any = None) -> None: ...
+ if sys.version_info >= (3, 9):
45
+ def __init__(self, x: int | float | str | bytes | bytearray | None = None) -> None: ... # noqa: Y041
46
+ else:
47
+ def __init__(self, x: Any = None) -> None: ...
48
# Using other `seed` types is deprecated since 3.9 and removed in 3.11
49
# Ignore Y041, since random.seed doesn't treat int like a float subtype. Having an explicit
50
# int better documents conventional usage of random.seed.
0 commit comments