mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 01:17:39 +08:00
Move contents of builtins/* to stdlib/*. This simplifies finding stubs.
This commit is contained in:
48
stdlib/2.7/time.pyi
Normal file
48
stdlib/2.7/time.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Stub file for the 'time' module."""
|
||||
# See https://docs.python.org/2/library/time.html
|
||||
|
||||
from typing import NamedTuple, Tuple, Union
|
||||
|
||||
# ----- variables and constants -----
|
||||
accept2dyear = False
|
||||
altzone = 0
|
||||
daylight = 0
|
||||
timezone = 0
|
||||
tzname = ... # type: Tuple[str, str]
|
||||
|
||||
struct_time = NamedTuple('struct_time',
|
||||
[('tm_year', int), ('tm_mon', int), ('tm_mday', int),
|
||||
('tm_hour', int), ('tm_min', int), ('tm_sec', int),
|
||||
('tm_wday', int), ('tm_yday', int), ('tm_isdst', int)])
|
||||
|
||||
_TIME_TUPLE = Tuple[int, int, int, int, int, int, int, int, int]
|
||||
|
||||
def asctime(t: struct_time = ...) -> str:
|
||||
raise ValueError()
|
||||
|
||||
def clock() -> float: ...
|
||||
|
||||
def ctime(secs: float = ...) -> str:
|
||||
raise ValueError()
|
||||
|
||||
def gmtime(secs: float = ...) -> struct_time: ...
|
||||
|
||||
def localtime(secs: float = ...) -> struct_time: ...
|
||||
|
||||
def mktime(t: struct_time) -> float:
|
||||
raise OverflowError()
|
||||
raise ValueError()
|
||||
|
||||
def sleep(secs: float) -> None: ...
|
||||
|
||||
def strftime(format: str, t: struct_time = ...) -> str:
|
||||
raise MemoryError()
|
||||
raise ValueError()
|
||||
|
||||
def strptime(string: str, format: str = ...) -> struct_time:
|
||||
raise ValueError()
|
||||
|
||||
def time() -> float:
|
||||
raise IOError()
|
||||
|
||||
def tzset() -> None: ...
|
||||
Reference in New Issue
Block a user