mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 22:11:54 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
from time import struct_time
|
||||
from typing import Any, Iterable, List, Optional, Sequence, Tuple, Union
|
||||
from typing import Any, Iterable, List, Optional, Sequence, Tuple
|
||||
|
||||
_LocaleType = Tuple[Optional[str], Optional[str]]
|
||||
|
||||
@@ -63,7 +63,7 @@ class HTMLCalendar(Calendar):
|
||||
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: Optional[str] = ..., encoding: Optional[str] = ...) -> str: ...
|
||||
def formatyearpage(self, theyear: int, width: int = ..., css: str | None = ..., encoding: str | None = ...) -> str: ...
|
||||
|
||||
class TimeEncoding:
|
||||
def __init__(self, locale: _LocaleType) -> None: ...
|
||||
@@ -71,12 +71,12 @@ class TimeEncoding:
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
|
||||
class LocaleTextCalendar(TextCalendar):
|
||||
def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ...
|
||||
def __init__(self, firstweekday: int = ..., locale: _LocaleType | None = ...) -> 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: _LocaleType | None = ...) -> None: ...
|
||||
def formatweekday(self, day: int) -> str: ...
|
||||
def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ...
|
||||
|
||||
@@ -85,7 +85,7 @@ 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 timegm(tuple: Union[Tuple[int, ...], struct_time]) -> int: ...
|
||||
def timegm(tuple: Tuple[int, ...] | struct_time) -> int: ...
|
||||
|
||||
# Data attributes
|
||||
day_name: Sequence[str]
|
||||
|
||||
Reference in New Issue
Block a user