mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
stdlib: fix signatures for some functions with unrepresentable defaults (#11000)
Found with python/mypy#16433 Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -8,7 +8,6 @@ from _locale import (
|
||||
LC_NUMERIC as LC_NUMERIC,
|
||||
LC_TIME as LC_TIME,
|
||||
localeconv as localeconv,
|
||||
setlocale as setlocale,
|
||||
strcoll as strcoll,
|
||||
strxfrm as strxfrm,
|
||||
)
|
||||
@@ -16,7 +15,7 @@ from _locale import (
|
||||
# This module defines a function "str()", which is why "str" can't be used
|
||||
# as a type annotation or type alias.
|
||||
from builtins import str as _str
|
||||
from collections.abc import Callable
|
||||
from collections.abc import Callable, Iterable
|
||||
from decimal import Decimal
|
||||
from typing import Any
|
||||
|
||||
@@ -131,6 +130,7 @@ def getdefaultlocale(
|
||||
envvars: tuple[_str, ...] = ("LC_ALL", "LC_CTYPE", "LANG", "LANGUAGE")
|
||||
) -> tuple[_str | None, _str | None]: ...
|
||||
def getlocale(category: int = ...) -> tuple[_str | None, _str | None]: ...
|
||||
def setlocale(category: int, locale: _str | Iterable[_str | None] | None = None) -> _str: ...
|
||||
def getpreferredencoding(do_setlocale: bool = True) -> _str: ...
|
||||
def normalize(localename: _str) -> _str: ...
|
||||
def resetlocale(category: int = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user