Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,6 +1,6 @@
import sys
from types import SimpleNamespace
from typing import Any, NamedTuple, Optional, Tuple, Union
from typing import Any, NamedTuple, Tuple
_TimeTuple = Tuple[int, int, int, int, int, int, int, int, int]
@@ -51,20 +51,16 @@ class _struct_time(NamedTuple):
class struct_time(_struct_time):
def __init__(
self,
o: Union[
Tuple[int, int, int, int, int, int, int, int, int],
Tuple[int, int, int, int, int, int, int, int, int, str],
Tuple[int, int, int, int, int, int, int, int, int, str, int],
],
o: Tuple[int, int, int, int, int, int, int, int, int]
| Tuple[int, int, int, int, int, int, int, int, int, str]
| Tuple[int, int, int, int, int, int, int, int, int, str, int],
_arg: Any = ...,
) -> None: ...
def __new__(
cls,
o: Union[
Tuple[int, int, int, int, int, int, int, int, int],
Tuple[int, int, int, int, int, int, int, int, int, str],
Tuple[int, int, int, int, int, int, int, int, int, str, int],
],
o: Tuple[int, int, int, int, int, int, int, int, int]
| Tuple[int, int, int, int, int, int, int, int, int, str]
| Tuple[int, int, int, int, int, int, int, int, int, str, int],
_arg: Any = ...,
) -> struct_time: ...
@property
@@ -72,17 +68,17 @@ class struct_time(_struct_time):
@property
def tm_gmtoff(self) -> int: ...
def asctime(t: Union[_TimeTuple, struct_time] = ...) -> str: ...
def asctime(t: _TimeTuple | struct_time = ...) -> str: ...
if sys.version_info < (3, 8):
def clock() -> float: ...
def ctime(secs: Optional[float] = ...) -> str: ...
def gmtime(secs: Optional[float] = ...) -> struct_time: ...
def localtime(secs: Optional[float] = ...) -> struct_time: ...
def mktime(t: Union[_TimeTuple, struct_time]) -> float: ...
def ctime(secs: float | None = ...) -> str: ...
def gmtime(secs: float | None = ...) -> struct_time: ...
def localtime(secs: float | None = ...) -> struct_time: ...
def mktime(t: _TimeTuple | struct_time) -> float: ...
def sleep(secs: float) -> None: ...
def strftime(format: str, t: Union[_TimeTuple, struct_time] = ...) -> str: ...
def strftime(format: str, t: _TimeTuple | struct_time = ...) -> str: ...
def strptime(string: str, format: str = ...) -> struct_time: ...
def time() -> float: ...