File: time.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (51 lines) | stat: -rw-r--r-- 1,492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""Stub file for the 'time' module."""
# See https://docs.python.org/2/library/time.html

from typing import NamedTuple, Tuple, Union, Any, Optional

# ----- variables and constants -----
accept2dyear = False
altzone = 0
daylight = 0
timezone = 0
tzname = ...  # type: Tuple[str, str]

class 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)])):
    def __init__(self, o: Tuple[int, int, int,
                                int, int, int,
                                int, int, int], _arg: Any = ...) -> None: ...

_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: Optional[float] = ...) -> str:
    raise ValueError()

def gmtime(secs: Optional[float] = ...) -> struct_time: ...

def localtime(secs: Optional[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: ...