mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -51,7 +51,7 @@ def monthrange(year: int, month: int) -> tuple[int, int]: ...
|
||||
|
||||
class Calendar:
|
||||
firstweekday: int
|
||||
def __init__(self, firstweekday: int = ...) -> None: ...
|
||||
def __init__(self, firstweekday: int = 0) -> None: ...
|
||||
def getfirstweekday(self) -> int: ...
|
||||
def setfirstweekday(self, firstweekday: int) -> None: ...
|
||||
def iterweekdays(self) -> Iterable[int]: ...
|
||||
@@ -61,9 +61,9 @@ class Calendar:
|
||||
def monthdatescalendar(self, year: int, month: int) -> list[list[datetime.date]]: ...
|
||||
def monthdays2calendar(self, year: int, month: int) -> list[list[tuple[int, int]]]: ...
|
||||
def monthdayscalendar(self, year: int, month: int) -> list[list[int]]: ...
|
||||
def yeardatescalendar(self, year: int, width: int = ...) -> list[list[int]]: ...
|
||||
def yeardays2calendar(self, year: int, width: int = ...) -> list[list[tuple[int, int]]]: ...
|
||||
def yeardayscalendar(self, year: int, width: int = ...) -> list[list[int]]: ...
|
||||
def yeardatescalendar(self, year: int, width: int = 3) -> list[list[int]]: ...
|
||||
def yeardays2calendar(self, year: int, width: int = 3) -> list[list[tuple[int, int]]]: ...
|
||||
def yeardayscalendar(self, year: int, width: int = 3) -> list[list[int]]: ...
|
||||
def itermonthdays3(self, year: int, month: int) -> Iterable[tuple[int, int, int]]: ...
|
||||
def itermonthdays4(self, year: int, month: int) -> Iterable[tuple[int, int, int, int]]: ...
|
||||
|
||||
@@ -73,21 +73,21 @@ class TextCalendar(Calendar):
|
||||
def formatweek(self, theweek: int, width: int) -> str: ...
|
||||
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: 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: int = ..., l: int = ..., c: int = ..., m: int = ...) -> None: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = True) -> str: ...
|
||||
def prmonth(self, theyear: int, themonth: int, w: int = 0, l: int = 0) -> None: ...
|
||||
def formatmonth(self, theyear: int, themonth: int, w: int = 0, l: int = 0) -> str: ...
|
||||
def formatyear(self, theyear: int, w: int = 2, l: int = 1, c: int = 6, m: int = 3) -> str: ...
|
||||
def pryear(self, theyear: int, w: int = 0, l: int = 0, c: int = 6, m: int = 3) -> 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: ...
|
||||
def prmonth(theyear: int, themonth: int, w: int = 0, l: int = 0) -> None: ...
|
||||
def month(theyear: int, themonth: int, w: int = 0, l: int = 0) -> str: ...
|
||||
def calendar(theyear: int, w: int = 2, l: int = 1, c: int = 6, m: int = 3) -> str: ...
|
||||
def prcal(theyear: int, w: int = 0, l: int = 0, c: int = 6, m: int = 3) -> None: ...
|
||||
|
||||
class HTMLCalendar(Calendar):
|
||||
cssclasses: ClassVar[list[str]]
|
||||
@@ -101,10 +101,12 @@ class HTMLCalendar(Calendar):
|
||||
def formatweek(self, theweek: int) -> str: ...
|
||||
def formatweekday(self, day: int) -> str: ...
|
||||
def formatweekheader(self) -> str: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ...
|
||||
def formatmonth(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ...
|
||||
def formatyear(self, theyear: int, width: int = ...) -> str: ...
|
||||
def formatyearpage(self, theyear: int, width: int = ..., css: str | None = ..., encoding: str | None = ...) -> str: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = True) -> str: ...
|
||||
def formatmonth(self, theyear: int, themonth: int, withyear: bool = True) -> str: ...
|
||||
def formatyear(self, theyear: int, width: int = 3) -> str: ...
|
||||
def formatyearpage(
|
||||
self, theyear: int, width: int = 3, css: str | None = "calendar.css", encoding: str | None = None
|
||||
) -> str: ...
|
||||
|
||||
class different_locale:
|
||||
def __init__(self, locale: _LocaleType) -> None: ...
|
||||
@@ -112,18 +114,18 @@ class different_locale:
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
|
||||
class LocaleTextCalendar(TextCalendar):
|
||||
def __init__(self, firstweekday: int = ..., locale: _LocaleType | None = ...) -> None: ...
|
||||
def __init__(self, firstweekday: int = 0, locale: _LocaleType | None = None) -> None: ...
|
||||
|
||||
class LocaleHTMLCalendar(HTMLCalendar):
|
||||
def __init__(self, firstweekday: int = ..., locale: _LocaleType | None = ...) -> None: ...
|
||||
def __init__(self, firstweekday: int = 0, locale: _LocaleType | None = None) -> None: ...
|
||||
def formatweekday(self, day: int) -> str: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = True) -> str: ...
|
||||
|
||||
c: TextCalendar
|
||||
|
||||
def setfirstweekday(firstweekday: int) -> None: ...
|
||||
def format(cols: int, colwidth: int = ..., spacing: int = ...) -> str: ...
|
||||
def formatstring(cols: int, colwidth: int = ..., spacing: int = ...) -> str: ...
|
||||
def format(cols: int, colwidth: int = 20, spacing: int = 6) -> str: ...
|
||||
def formatstring(cols: int, colwidth: int = 20, spacing: int = 6) -> str: ...
|
||||
def timegm(tuple: tuple[int, ...] | struct_time) -> int: ...
|
||||
|
||||
# Data attributes
|
||||
|
||||
Reference in New Issue
Block a user