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:
Jelle Zijlstra
2023-11-09 08:14:36 -08:00
committed by GitHub
parent 7f9b3ea6c3
commit d9311f946e
6 changed files with 13 additions and 13 deletions

View File

@@ -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: ...