mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 20:12:21 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, Iterator, List, Optional, Text, Tuple, Type, TypeVar, Union
|
||||
from typing import Any, Dict, Iterator, List, Text, Tuple, Type, TypeVar, Union
|
||||
|
||||
_RetType = Union[Type[float], Type[datetime.datetime]]
|
||||
_SelfT = TypeVar("_SelfT", bound=croniter)
|
||||
@@ -16,26 +16,26 @@ class croniter(Iterator[Any]):
|
||||
ALPHACONV: Tuple[Dict[str, Any], ...]
|
||||
LOWMAP: Tuple[Dict[int, Any], ...]
|
||||
bad_length: str
|
||||
tzinfo: Optional[datetime.tzinfo]
|
||||
tzinfo: datetime.tzinfo | None
|
||||
cur: float
|
||||
expanded: List[List[str]]
|
||||
start_time: float
|
||||
dst_start_time: float
|
||||
nth_weekday_of_month: Dict[str, Any]
|
||||
def __init__(
|
||||
self, expr_format: Text, start_time: Optional[Union[float, datetime.datetime]] = ..., ret_type: Optional[_RetType] = ...
|
||||
self, expr_format: Text, start_time: float | datetime.datetime | None = ..., ret_type: _RetType | None = ...
|
||||
) -> None: ...
|
||||
# Most return value depend on ret_type, which can be passed in both as a method argument and as
|
||||
# a constructor argument.
|
||||
def get_next(self, ret_type: Optional[_RetType] = ...) -> Any: ...
|
||||
def get_prev(self, ret_type: Optional[_RetType] = ...) -> Any: ...
|
||||
def get_current(self, ret_type: Optional[_RetType] = ...) -> Any: ...
|
||||
def get_next(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def get_prev(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def get_current(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def __iter__(self: _SelfT) -> _SelfT: ...
|
||||
def __next__(self, ret_type: Optional[_RetType] = ...) -> Any: ...
|
||||
def next(self, ret_type: Optional[_RetType] = ...) -> Any: ...
|
||||
def all_next(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ...
|
||||
def all_prev(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ...
|
||||
def iter(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ...
|
||||
def __next__(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def next(self, ret_type: _RetType | None = ...) -> Any: ...
|
||||
def all_next(self, ret_type: _RetType | None = ...) -> Iterator[Any]: ...
|
||||
def all_prev(self, ret_type: _RetType | None = ...) -> Iterator[Any]: ...
|
||||
def iter(self, ret_type: _RetType | None = ...) -> Iterator[Any]: ...
|
||||
def is_leap(self, year: int) -> bool: ...
|
||||
@classmethod
|
||||
def expand(cls, expr_format: Text) -> Tuple[List[List[str]], Dict[str, Any]]: ...
|
||||
|
||||
Reference in New Issue
Block a user