add to calendar stub (#1359)

This commit is contained in:
Jelle Zijlstra
2017-05-26 06:27:08 -07:00
committed by Matthias Kramm
parent aeb19baa84
commit 2800002ebf

View File

@@ -4,7 +4,7 @@ from time import struct_time
from typing import Any, Iterable, List, Optional, Sequence, Tuple, Union
LocaleType = Tuple[Optional[str], Optional[str]]
_LocaleType = Tuple[Optional[str], Optional[str]]
class IllegalMonthError(ValueError):
def __init__(self, month: int) -> None: ...
@@ -41,10 +41,20 @@ class TextCalendar(Calendar):
def formatweekday(self, day: int, width: int) -> str: ...
def formatweekheader(self, width: int) -> str: ...
def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = ...) -> str: ...
def prmonth(self, theyear: int, themonth: int, w: Any=0, l: Any = 0) -> None: ...
def prmonth(self, theyear: int, themonth: int, w: int = ..., l: int = ...) -> None: ...
def formatmonth(self, theyear: int, themonth: int, w: int = ..., l: int = ...) -> str: ...
def formatyear(self, theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> str: ...
def pryear(self, theyear: int, w: Any = 0, l: Any = 0, c: Any = 6, m: Any = 3) -> None: ...
def pryear(self, theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> None: ...
def firstweekday() -> int: ...
def monthcalendar(year: int, month: int) -> List[List[int]]: ...
def prweek(theweek: int, width: int) -> None: ...
def week(theweek: int, width: int) -> str: ...
def weekheader(width: int) -> str: ...
def prmonth(theyear: int, themonth: int, w: int = ..., l: int = ...) -> None: ...
def month(theyear: int, themonth: int, w: int = ..., l: int = ...) -> str: ...
def calendar(theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> str: ...
def prcal(theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> None: ...
class HTMLCalendar(Calendar):
def formatday(self, day: int, weekday: int) -> str: ...
@@ -58,22 +68,22 @@ class HTMLCalendar(Calendar):
if sys.version_info < (3, 0):
class TimeEncoding:
def __init__(self, locale: LocaleType) -> None: ...
def __enter__(self) -> LocaleType: ...
def __init__(self, locale: _LocaleType) -> None: ...
def __enter__(self) -> _LocaleType: ...
def __exit__(self, *args) -> None: ...
else:
class different_locale:
def __init__(self, locale: LocaleType) -> None: ...
def __enter__(self) -> LocaleType: ...
def __init__(self, locale: _LocaleType) -> None: ...
def __enter__(self) -> _LocaleType: ...
def __exit__(self, *args) -> None: ...
class LocaleTextCalendar(TextCalendar):
def __init__(self, firstweekday: int = ..., locale: Optional[LocaleType] = ...) -> None: ...
def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ...
def formatweekday(self, day: int, width: int) -> str: ...
def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = ...) -> str: ...
class LocaleHTMLCalendar(HTMLCalendar):
def __init__(self, firstweekday: int = ..., locale: Optional[LocaleType] = ...) -> None: ...
def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ...
def formatweekday(self, day: int) -> str: ...
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ...