diff --git a/stdlib/_locale.pyi b/stdlib/_locale.pyi index 2b2fe03e4510..d7399f15e1a3 100644 --- a/stdlib/_locale.pyi +++ b/stdlib/_locale.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import StrPath -from collections.abc import Iterable, Mapping +from collections.abc import Mapping LC_CTYPE: int LC_COLLATE: int @@ -10,7 +10,7 @@ LC_NUMERIC: int LC_ALL: int CHAR_MAX: int -def setlocale(category: int, locale: str | Iterable[str | None] | None = None) -> str: ... +def setlocale(__category: int, __locale: str | None = None) -> str: ... def localeconv() -> Mapping[str, int | str | list[int]]: ... if sys.version_info >= (3, 11): diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 909e180c94dd..f06820f496d8 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1288,7 +1288,7 @@ if sys.version_info >= (3, 10): # See discussion in #7491 and pure-Python implementation of `anext` at https://github.com/python/cpython/blob/ea786a882b9ed4261eafabad6011bc7ef3b5bf94/Lib/test/test_asyncgen.py#L52-L80 def anext(__i: _SupportsSynchronousAnext[_AwaitableT]) -> _AwaitableT: ... @overload - async def anext(__i: SupportsAnext[_T], default: _VT) -> _T | _VT: ... + async def anext(__i: SupportsAnext[_T], __default: _VT) -> _T | _VT: ... # compile() returns a CodeType, unless the flags argument includes PyCF_ONLY_AST (=1024), # in which case it returns ast.AST. We have overloads for flag 0 (the default) and for diff --git a/stdlib/cmath.pyi b/stdlib/cmath.pyi index 0a85600e99b7..658cfb2d40ed 100644 --- a/stdlib/cmath.pyi +++ b/stdlib/cmath.pyi @@ -30,7 +30,7 @@ def exp(__z: _C) -> complex: ... def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool: ... def isinf(__z: _C) -> bool: ... def isnan(__z: _C) -> bool: ... -def log(__x: _C, __y_obj: _C = ...) -> complex: ... +def log(__x: _C, __base: _C = ...) -> complex: ... def log10(__z: _C) -> complex: ... def phase(__z: _C) -> float: ... def polar(__z: _C) -> tuple[float, float]: ... diff --git a/stdlib/locale.pyi b/stdlib/locale.pyi index 2e95c659dbcd..c18523e04361 100644 --- a/stdlib/locale.pyi +++ b/stdlib/locale.pyi @@ -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: ... diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index 2f47c4a820bd..2810d086ae49 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -970,9 +970,9 @@ else: def WTERMSIG(status: int) -> int: ... if sys.version_info >= (3, 8): def posix_spawn( - path: StrOrBytesPath, - argv: _ExecVArgs, - env: _ExecEnv, + __path: StrOrBytesPath, + __argv: _ExecVArgs, + __env: _ExecEnv, *, file_actions: Sequence[tuple[Any, ...]] | None = ..., setpgroup: int | None = ..., @@ -983,9 +983,9 @@ else: scheduler: tuple[Any, sched_param] | None = ..., ) -> int: ... def posix_spawnp( - path: StrOrBytesPath, - argv: _ExecVArgs, - env: _ExecEnv, + __path: StrOrBytesPath, + __argv: _ExecVArgs, + __env: _ExecEnv, *, file_actions: Sequence[tuple[Any, ...]] | None = ..., setpgroup: int | None = ..., diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index e85f49207763..5a78b34e97ad 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -352,7 +352,7 @@ class Connection: def cursor(self, cursorClass: None = None) -> Cursor: ... @overload def cursor(self, cursorClass: Callable[[Connection], _CursorT]) -> _CursorT: ... - def execute(self, sql: str, parameters: _Parameters = ...) -> Cursor: ... + def execute(self, __sql: str, __parameters: _Parameters = ...) -> Cursor: ... def executemany(self, __sql: str, __parameters: Iterable[_Parameters]) -> Cursor: ... def executescript(self, __sql_script: str) -> Cursor: ... def interrupt(self) -> None: ...