mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
locale: various improvements (#3860)
- fix delocalize return type - fix arg names - add missing args
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for locale
|
||||
|
||||
from decimal import Decimal
|
||||
from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
|
||||
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
|
||||
import sys
|
||||
|
||||
# workaround for mypy#2010
|
||||
@@ -92,21 +92,21 @@ def normalize(localename: _str) -> _str: ...
|
||||
def resetlocale(category: int = ...) -> None: ...
|
||||
def strcoll(string1: _str, string2: _str) -> int: ...
|
||||
def strxfrm(string: _str) -> _str: ...
|
||||
def format(format: _str, val: Union[float, Decimal], grouping: bool = ...,
|
||||
monetary: bool = ...) -> _str: ...
|
||||
def format(percent: _str, value: Union[float, Decimal], grouping: bool = ...,
|
||||
monetary: bool = ..., *additional: Any) -> _str: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def format_string(format: _str, val: Any,
|
||||
def format_string(f: _str, val: Any,
|
||||
grouping: bool = ..., monetary: bool = ...) -> _str: ...
|
||||
else:
|
||||
def format_string(format: _str, val: Any,
|
||||
def format_string(f: _str, val: Any,
|
||||
grouping: bool = ...) -> _str: ...
|
||||
def currency(val: Union[int, float, Decimal], symbol: bool = ..., grouping: bool = ...,
|
||||
international: bool = ...) -> _str: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def delocalize(string: _str) -> None: ...
|
||||
def atof(string: _str) -> float: ...
|
||||
def delocalize(string: _str) -> _str: ...
|
||||
def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ...
|
||||
def atoi(string: _str) -> int: ...
|
||||
def str(float: float) -> _str: ...
|
||||
def str(val: float) -> _str: ...
|
||||
|
||||
locale_alias: Dict[_str, _str] # undocumented
|
||||
locale_encoding_alias: Dict[_str, _str] # undocumented
|
||||
|
||||
@@ -471,10 +471,6 @@ lib2to3.pytree.Base.type
|
||||
lib2to3.pytree.BasePattern.type
|
||||
lib2to3.pytree.NegatedPattern.match
|
||||
lib2to3.pytree.NegatedPattern.match_seq
|
||||
locale.atof
|
||||
locale.format
|
||||
locale.format_string
|
||||
locale.str
|
||||
logging.Formatter.formatException
|
||||
logging.Handler.addFilter
|
||||
logging.Handler.removeFilter
|
||||
|
||||
Reference in New Issue
Block a user