mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Update dateutil to 2.7.5 (#2694)
This is still missing the easter and tzinfo module, but includes newer functions like today and isoparse.
This commit is contained in:
committed by
Jelle Zijlstra
parent
897148073a
commit
a868221347
2
third_party/2and3/dateutil/_common.pyi
vendored
2
third_party/2and3/dateutil/_common.pyi
vendored
@@ -9,5 +9,7 @@ class weekday(object):
|
||||
|
||||
def __repr__(self) -> str: ...
|
||||
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
weekday: int
|
||||
n: int
|
||||
|
||||
2
third_party/2and3/dateutil/parser.pyi
vendored
2
third_party/2and3/dateutil/parser.pyi
vendored
@@ -33,6 +33,8 @@ class parser(object):
|
||||
ignoretz: bool = ..., tzinfos: Optional[Mapping[Text, tzinfo]] = ...,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
def isoparse(dt_str: Union[str, bytes, IO[str], IO[bytes]]) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER: parser
|
||||
def parse(timestr: _FileOrStr, parserinfo: Optional[parserinfo] = ..., **kwargs: Any) -> datetime: ...
|
||||
class _tzparser: ...
|
||||
|
||||
2
third_party/2and3/dateutil/relativedelta.pyi
vendored
2
third_party/2and3/dateutil/relativedelta.pyi
vendored
@@ -87,3 +87,5 @@ class relativedelta(object):
|
||||
def __div__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
def __truediv__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __abs__(self: _SelfT) -> _SelfT: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
1
third_party/2and3/dateutil/tz/__init__.pyi
vendored
1
third_party/2and3/dateutil/tz/__init__.pyi
vendored
@@ -9,6 +9,7 @@ from .tz import (
|
||||
gettz as gettz,
|
||||
datetime_exists as datetime_exists,
|
||||
datetime_ambiguous as datetime_ambiguous,
|
||||
resolve_imaginary as resolve_imaginary,
|
||||
)
|
||||
|
||||
UTC: tzutc
|
||||
|
||||
15
third_party/2and3/dateutil/tz/tz.pyi
vendored
15
third_party/2and3/dateutil/tz/tz.pyi
vendored
@@ -31,6 +31,9 @@ class tzoffset(datetime.tzinfo):
|
||||
def __ne__(self, other): ...
|
||||
__reduce__: Any
|
||||
|
||||
@classmethod
|
||||
def instance(cls, name, offset) -> tzoffset: ...
|
||||
|
||||
class tzlocal(_tzinfo):
|
||||
def __init__(self) -> None: ...
|
||||
def utcoffset(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ...
|
||||
@@ -70,6 +73,9 @@ class tzstr(tzrange):
|
||||
hasdst: bool
|
||||
def __init__(self, s: Union[bytes, _FileObj], posix_offset: bool = ...) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def instance(cls, name, offset) -> tzoffset: ...
|
||||
|
||||
class tzical:
|
||||
def __init__(self, fileobj: _FileObj) -> None: ...
|
||||
def keys(self): ...
|
||||
@@ -78,6 +84,13 @@ class tzical:
|
||||
TZFILES: List[str]
|
||||
TZPATHS: List[str]
|
||||
|
||||
def gettz(name: Optional[Text] = ...) -> Optional[datetime.tzinfo]: ...
|
||||
def datetime_exists(dt: datetime.datetime, tz: Optional[datetime.tzinfo] = ...) -> bool: ...
|
||||
def datetime_ambiguous(dt: datetime.datetime, tz: Optional[datetime.tzinfo] = ...) -> bool: ...
|
||||
def resolve_imaginary(dt: datetime.datetime) -> datetime.datetime: ...
|
||||
|
||||
|
||||
class _GetTZ:
|
||||
def __call__(self, name: Optional[Text] = ...) -> Optional[datetime.tzinfo]: ...
|
||||
def nocache(self, name: Optional[Text]) -> Optional[datetime.tzinfo]: ...
|
||||
|
||||
gettz: _GetTZ
|
||||
|
||||
7
third_party/2and3/dateutil/utils.pyi
vendored
Normal file
7
third_party/2and3/dateutil/utils.pyi
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Optional
|
||||
from datetime import datetime, tzinfo, timedelta
|
||||
|
||||
|
||||
def default_tzinfo(dt: datetime, tzinfo: tzinfo) -> datetime: ...
|
||||
def today(tzinfo: Optional[tzinfo] = ...) -> datetime: ...
|
||||
def within_delta(dt1: datetime, dt2: datetime, delta: timedelta) -> bool: ...
|
||||
Reference in New Issue
Block a user