mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
Replace a number of default argument values with "..." (#1280)
pytype apparently doesn't like default values that aren't ints or None/True/False.
This commit is contained in:
committed by
Guido van Rossum
parent
3896298027
commit
728b977729
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
|
||||
from time import struct_time
|
||||
from typing import Any, Iterable, List, Optional, Tuple, Sequence, Union
|
||||
from typing import Any, Iterable, List, Optional, Sequence, Tuple, Union
|
||||
|
||||
|
||||
LocaleType = Tuple[Optional[str], Optional[str]]
|
||||
@@ -20,7 +20,7 @@ def weekday(year: int, month: int, day: int) -> int: ...
|
||||
def monthrange(year: int, month: int) -> Tuple[int, int]: ...
|
||||
|
||||
class Calendar:
|
||||
def __init__(self, firstweekday: int = 0) -> None: ...
|
||||
def __init__(self, firstweekday: int = ...) -> None: ...
|
||||
def getfirstweekday(self) -> int: ...
|
||||
def setfirstweekday(self, firstweekday: int) -> None: ...
|
||||
def iterweekdays(self) -> Iterable[int]: ...
|
||||
@@ -30,9 +30,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 = 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 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]]: ...
|
||||
|
||||
class TextCalendar(Calendar):
|
||||
def prweek(self, theweek: int, width: int) -> None: ...
|
||||
@@ -42,8 +42,8 @@ class TextCalendar(Calendar):
|
||||
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 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 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: ...
|
||||
|
||||
class HTMLCalendar(Calendar):
|
||||
@@ -53,8 +53,8 @@ class HTMLCalendar(Calendar):
|
||||
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 = 3) -> str: ...
|
||||
def formatyearpage(self, theyear: int, width: int = 3, css: Optional[str] = 'calendar.css', encoding: Optional[str] = ...) -> str: ...
|
||||
def formatyear(self, theyear: int, width: int = ...) -> str: ...
|
||||
def formatyearpage(self, theyear: int, width: int = ..., css: Optional[str] = ..., encoding: Optional[str] = ...) -> str: ...
|
||||
|
||||
class different_locale:
|
||||
def __init__(self, locale: LocaleType) -> None: ...
|
||||
@@ -62,12 +62,12 @@ class different_locale:
|
||||
def __exit__(self, *args) -> None: ...
|
||||
|
||||
class LocaleTextCalendar(TextCalendar):
|
||||
def __init__(self, firstweekday: int = 0, 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 = 0, 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: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user