Skip to content

Commit f5f349c

Browse files
jukeboxgvanrossum
authored andcommitted
dateutil stubs (Python 3)
PR #133
1 parent 8df1984 commit f5f349c

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

third_party/3/dateutil/__init__.pyi

Whitespace-only changes.

third_party/3/dateutil/parser.pyi

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
from typing import List, Tuple, Optional, Callable, Union, IO, Any
2+
from datetime import datetime
3+
4+
__all__ = ... # type: List[str]
5+
6+
7+
class parserinfo(object):
8+
JUMP = ... # type: List[str]
9+
WEEKDAYS = ... # type: List[Tuple[str, str]]
10+
MONTHS = ... # type: List[Tuple[str, str]]
11+
HMS = ... # type: List[Tuple[str, str, str]]
12+
AMPM = ... # type: List[Tuple[str, str, str]]
13+
UTCZONE = ... # type: List[str]
14+
PERTAIN = ... # type: List[str]
15+
TZOFFSET = ... # type: Dict[str, int]
16+
17+
def __init__(self, dayfirst: bool=..., yearfirst: bool=...) -> None: ...
18+
def jump(self, name: str) -> bool: ...
19+
def weekday(self, name: str) -> str: ...
20+
def month(self, name: str) -> str: ...
21+
def hms(self, name: str) -> str: ...
22+
def ampm(self, name: str) -> str: ...
23+
def pertain(self, name: str) -> bool: ...
24+
def utczone(self, name: str) -> bool: ...
25+
def tzoffset(self, name: str) -> int: ...
26+
def convertyear(self, year: int) -> int: ...
27+
def validate(self, year: datetime) -> bool: ...
28+
29+
30+
class parser(object):
31+
def __init__(self, info: parserinfo=...) -> None: ...
32+
33+
def parse(
34+
self,
35+
timestr: Union[str, bytes, IO[Any]],
36+
default: Optional[datetime],
37+
ignoretz: bool=...,
38+
tzinfos =...,
39+
) -> datetime: ...
40+
41+
DEFAULTPARSER = ... # type: parser
42+
43+
44+
def parse(timestr, parserinfo: parserinfo=..., **kwargs) -> datetime:
45+
...
46+
47+
48+
class _tzparser(object):
49+
...
50+
51+
52+
DEFAULTTZPARSER = ... # type: _tzparser

0 commit comments

Comments
 (0)