mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -4,7 +4,7 @@ import sys
|
||||
# as a type annotation or type alias.
|
||||
from builtins import str as _str
|
||||
from decimal import Decimal
|
||||
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
|
||||
from typing import Any, Callable, Dict, Iterable, List, Mapping, Sequence, Tuple
|
||||
|
||||
CODESET: int
|
||||
D_T_FMT: int
|
||||
@@ -77,17 +77,17 @@ CHAR_MAX: int
|
||||
|
||||
class Error(Exception): ...
|
||||
|
||||
def setlocale(category: int, locale: Union[_str, Iterable[_str], None] = ...) -> _str: ...
|
||||
def localeconv() -> Mapping[_str, Union[int, _str, List[int]]]: ...
|
||||
def setlocale(category: int, locale: _str | Iterable[_str] | None = ...) -> _str: ...
|
||||
def localeconv() -> Mapping[_str, int | _str | List[int]]: ...
|
||||
def nl_langinfo(__key: int) -> _str: ...
|
||||
def getdefaultlocale(envvars: Tuple[_str, ...] = ...) -> Tuple[Optional[_str], Optional[_str]]: ...
|
||||
def getdefaultlocale(envvars: Tuple[_str, ...] = ...) -> Tuple[_str | None, _str | None]: ...
|
||||
def getlocale(category: int = ...) -> Sequence[_str]: ...
|
||||
def getpreferredencoding(do_setlocale: bool = ...) -> _str: ...
|
||||
def normalize(localename: _str) -> _str: ...
|
||||
def resetlocale(category: int = ...) -> None: ...
|
||||
def strcoll(string1: _str, string2: _str) -> int: ...
|
||||
def strxfrm(string: _str) -> _str: ...
|
||||
def format(percent: _str, value: Union[float, Decimal], grouping: bool = ..., monetary: bool = ..., *additional: Any) -> _str: ...
|
||||
def format(percent: _str, value: float | Decimal, grouping: bool = ..., monetary: bool = ..., *additional: Any) -> _str: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def format_string(f: _str, val: Any, grouping: bool = ..., monetary: bool = ...) -> _str: ...
|
||||
@@ -95,7 +95,7 @@ if sys.version_info >= (3, 7):
|
||||
else:
|
||||
def format_string(f: _str, val: Any, grouping: bool = ...) -> _str: ...
|
||||
|
||||
def currency(val: Union[int, float, Decimal], symbol: bool = ..., grouping: bool = ..., international: bool = ...) -> _str: ...
|
||||
def currency(val: int | float | Decimal, symbol: bool = ..., grouping: bool = ..., international: bool = ...) -> _str: ...
|
||||
def delocalize(string: _str) -> _str: ...
|
||||
def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ...
|
||||
def atoi(string: _str) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user