mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 18:36:31 +08:00
fix up some C signatures (#14624)
a few issues exposed after https://github.com/python/mypy/pull/18259 was merged
This commit is contained in:
+7
-2
@@ -1,10 +1,15 @@
|
||||
from typing_extensions import TypeAlias
|
||||
import sys
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
# Actually Tuple[(int,) * 625]
|
||||
_State: TypeAlias = tuple[int, ...]
|
||||
|
||||
class Random:
|
||||
def __init__(self, seed: object = ...) -> None: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(self, seed: object = ..., /) -> None: ...
|
||||
else:
|
||||
def __new__(self, seed: object = ..., /) -> Self: ...
|
||||
|
||||
def seed(self, n: object = None, /) -> None: ...
|
||||
def getstate(self) -> _State: ...
|
||||
def setstate(self, state: _State, /) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user