mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use _typeshed.Self in docutils.VersionInfo and os.sched_param (#7117)
This commit is contained in:
@@ -953,7 +953,7 @@ else:
|
||||
if sys.platform != "win32":
|
||||
@final
|
||||
class sched_param(structseq[int], tuple[int]):
|
||||
def __new__(cls, sched_priority: int) -> sched_param: ...
|
||||
def __new__(cls: type[Self], sched_priority: int) -> Self: ...
|
||||
@property
|
||||
def sched_priority(self) -> int: ...
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, ClassVar, NamedTuple
|
||||
|
||||
__docformat__: str
|
||||
@@ -13,8 +14,14 @@ class _VersionInfo(NamedTuple):
|
||||
|
||||
class VersionInfo(_VersionInfo):
|
||||
def __new__(
|
||||
cls, major: int = ..., minor: int = ..., micro: int = ..., releaselevel: str = ..., serial: int = ..., release: bool = ...
|
||||
) -> VersionInfo: ...
|
||||
cls: type[Self],
|
||||
major: int = ...,
|
||||
minor: int = ...,
|
||||
micro: int = ...,
|
||||
releaselevel: str = ...,
|
||||
serial: int = ...,
|
||||
release: bool = ...,
|
||||
) -> Self: ...
|
||||
|
||||
__version_info__: VersionInfo
|
||||
__version_details__: str
|
||||
|
||||
Reference in New Issue
Block a user