File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,10 @@ class Random(_random.Random):
67
67
VERSION : ClassVar [int ]
68
68
def __init__ (self , x : Any = ...) -> None : ...
69
69
# Using other `seed` types is deprecated since 3.9 and removed in 3.11
70
+ # Ignore Y041, since random.seed doesn't treat int like a float subtype. Having an explicit
71
+ # int better documents conventional usage of random.seed.
70
72
if sys .version_info >= (3 , 9 ):
71
- def seed (self , a : float | str | bytes | bytearray | None = ..., version : int = ...) -> None : ... # type: ignore[override]
73
+ def seed (self , a : int | float | str | bytes | bytearray | None = ..., version : int = ...) -> None : ... # type: ignore[override] # noqa: Y041
72
74
else :
73
75
def seed (self , a : Any = ..., version : int = ...) -> None : ...
74
76
You can’t perform that action at this time.
0 commit comments