Consistently use '= ...' for optional parameters.

This commit is contained in:
Matthias Kramm
2015-11-09 13:55:00 -08:00
parent 375bf063b1
commit 94c9ce8fd0
278 changed files with 2085 additions and 2085 deletions

View File

@@ -18,7 +18,7 @@ class timezone(tzinfo):
min = ... # type: tzinfo
max = ... # type: tzinfo
def __init__(self, offset: timedelta, name: str = '') -> None: ...
def __init__(self, offset: timedelta, name: str = ...) -> None: ...
def __hash__(self) -> int: ...
_tzinfo = tzinfo
@@ -29,7 +29,7 @@ class date(object):
max = ... # type: date
resolution = ... # type: timedelta
def __init__(self, year: int, month: int = None, day: int = None) -> None: ...
def __init__(self, year: int, month: int = ..., day: int = ...) -> None: ...
@classmethod
def fromtimestamp(cls, t: float) -> date: ...
@@ -51,7 +51,7 @@ class date(object):
def isoformat(self) -> str: ...
def timetuple(self) -> tuple: ... # TODO return type
def toordinal(self) -> int: ...
def replace(self, year: int = None, month: int = None, day: int = None) -> date: ...
def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ...
def __le__(self, other: date) -> bool: ...
def __lt__(self, other: date) -> bool: ...
def __ge__(self, other: date) -> bool: ...
@@ -71,8 +71,8 @@ class time:
max = ... # type: time
resolution = ... # type: timedelta
def __init__(self, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0,
tzinfo: tzinfo = None) -> None: ...
def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
tzinfo: tzinfo = ...) -> None: ...
@property
def hour(self) -> int: ...
@@ -96,8 +96,8 @@ class time:
def utcoffset(self) -> Optional[int]: ...
def tzname(self) -> Optional[str]: ...
def dst(self) -> Optional[int]: ...
def replace(self, hour: int = None, minute: int = None, second: int = None,
microsecond: int = None, tzinfo: Union[_tzinfo, bool] = True) -> time: ...
def replace(self, hour: int = ..., minute: int = ..., second: int = ...,
microsecond: int = ..., tzinfo: Union[_tzinfo, bool] = ...) -> time: ...
_date = date
_time = time
@@ -107,9 +107,9 @@ class timedelta(SupportsAbs[timedelta]):
max = ... # type: timedelta
resolution = ... # type: timedelta
def __init__(self, days: int = 0, seconds: int = 0, microseconds: int = 0,
milliseconds: int = 0, minutes: int = 0, hours: int = 0,
weeks: int = 0) -> None: ...
def __init__(self, days: int = ..., seconds: int = ..., microseconds: int = ...,
milliseconds: int = ..., minutes: int = ..., hours: int = ...,
weeks: int = ...) -> None: ...
@property
def days(self) -> int: ...
@@ -150,9 +150,9 @@ class datetime(object):
max = ... # type: datetime
resolution = ... # type: timedelta
def __init__(self, year: int, month: int = None, day: int = None, hour: int = None,
minute: int = None, second: int = None, microseconds: int = None,
tzinfo: tzinfo = None) -> None: ...
def __init__(self, year: int, month: int = ..., day: int = ..., hour: int = ...,
minute: int = ..., second: int = ..., microseconds: int = ...,
tzinfo: tzinfo = ...) -> None: ...
@property
def year(self) -> int: ...
@@ -172,7 +172,7 @@ class datetime(object):
def tzinfo(self) -> _tzinfo: ...
@classmethod
def fromtimestamp(cls, t: float, tz: timezone = None) -> datetime: ...
def fromtimestamp(cls, t: float, tz: timezone = ...) -> datetime: ...
@classmethod
def utcfromtimestamp(cls, t: float) -> datetime: ...
@classmethod
@@ -180,7 +180,7 @@ class datetime(object):
@classmethod
def fromordinal(cls, n: int) -> datetime: ...
@classmethod
def now(cls, tz: timezone = None) -> datetime: ...
def now(cls, tz: timezone = ...) -> datetime: ...
@classmethod
def utcnow(cls) -> datetime: ...
@classmethod
@@ -195,12 +195,12 @@ class datetime(object):
def date(self) -> _date: ...
def time(self) -> _time: ...
def timetz(self) -> _time: ...
def replace(self, year: int = None, month: int = None, day: int = None, hour: int = None,
minute: int = None, second: int = None, microsecond: int = None, tzinfo:
Union[_tzinfo, bool] = True) -> datetime: ...
def astimezone(self, tz: timezone = None) -> datetime: ...
def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,
minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:
Union[_tzinfo, bool] = ...) -> datetime: ...
def astimezone(self, tz: timezone = ...) -> datetime: ...
def ctime(self) -> str: ...
def isoformat(self, sep: str = 'T') -> str: ...
def isoformat(self, sep: str = ...) -> str: ...
@classmethod
def strptime(cls, date_string: str, format: str) -> datetime: ...
def utcoffset(self) -> Optional[int]: ...