All functions parameters in time module are positional-only (#11248)

This commit is contained in:
Ali Hamdan
2024-01-14 13:52:54 +01:00
committed by GitHub
parent 403d43b13c
commit ae9a68a86e

View File

@@ -63,14 +63,14 @@ class struct_time(structseq[Any | int], _TimeTuple):
@property
def tm_gmtoff(self) -> int: ...
def asctime(t: _TimeTuple | struct_time = ...) -> str: ...
def ctime(secs: float | None = ...) -> str: ...
def gmtime(secs: float | None = ...) -> struct_time: ...
def localtime(secs: float | None = ...) -> struct_time: ...
def mktime(t: _TimeTuple | struct_time) -> float: ...
def sleep(secs: float) -> None: ...
def strftime(format: str, t: _TimeTuple | struct_time = ...) -> str: ...
def strptime(string: str, format: str = ...) -> struct_time: ...
def asctime(time_tuple: _TimeTuple | struct_time = ..., /) -> str: ...
def ctime(seconds: float | None = None, /) -> str: ...
def gmtime(seconds: float | None = None, /) -> struct_time: ...
def localtime(seconds: float | None = None, /) -> struct_time: ...
def mktime(time_tuple: _TimeTuple | struct_time, /) -> float: ...
def sleep(seconds: float, /) -> None: ...
def strftime(format: str, time_tuple: _TimeTuple | struct_time = ..., /) -> str: ...
def strptime(data_string: str, format: str = "%a %b %d %H:%M:%S %Y", /) -> struct_time: ...
def time() -> float: ...
if sys.platform != "win32":
@@ -82,22 +82,22 @@ class _ClockInfo(Protocol):
monotonic: bool
resolution: float
def get_clock_info(name: Literal["monotonic", "perf_counter", "process_time", "time", "thread_time"]) -> _ClockInfo: ...
def get_clock_info(name: Literal["monotonic", "perf_counter", "process_time", "time", "thread_time"], /) -> _ClockInfo: ...
def monotonic() -> float: ...
def perf_counter() -> float: ...
def process_time() -> float: ...
if sys.platform != "win32":
def clock_getres(clk_id: int) -> float: ... # Unix only
def clock_gettime(clk_id: int) -> float: ... # Unix only
def clock_settime(clk_id: int, time: float) -> None: ... # Unix only
def clock_getres(clk_id: int, /) -> float: ... # Unix only
def clock_gettime(clk_id: int, /) -> float: ... # Unix only
def clock_settime(clk_id: int, time: float, /) -> None: ... # Unix only
if sys.platform != "win32":
def clock_gettime_ns(clock_id: int) -> int: ...
def clock_settime_ns(clock_id: int, time: int) -> int: ...
def clock_gettime_ns(clock_id: int, /) -> int: ...
def clock_settime_ns(clock_id: int, time: int, /) -> int: ...
if sys.platform == "linux":
def pthread_getcpuclockid(thread_id: int) -> int: ...
def pthread_getcpuclockid(thread_id: int, /) -> int: ...
def monotonic_ns() -> int: ...
def perf_counter_ns() -> int: ...