locale: various improvements (#3860)

- fix delocalize return type
- fix arg names
- add missing args
This commit is contained in:
Shantanu authored and GitHub committed 2020-03-22 08:53:32 -07:00
1 parent 8ac3e46074
commit 4de4cd0428
2 files changed
+8 -12

No files matched your search

+8 -8
View File
@@ -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
-4
View File
@@ -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