Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stdlib/_asyncio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Future(Awaitable[_T]):
@_log_traceback.setter
def _log_traceback(self, val: Literal[False]) -> None: ...
_asyncio_future_blocking: bool # is a part of duck-typing contract for `Future`
def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ...
def __init__(self, *, loop: AbstractEventLoop | None = None) -> None: ...
def __del__(self) -> None: ...
def get_loop(self) -> AbstractEventLoop: ...
@property
Expand Down Expand Up @@ -56,7 +56,7 @@ class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportIn
coro: _TaskCompatibleCoro[_T_co],
*,
loop: AbstractEventLoop | None = None,
name: str | None = ...,
name: str | None = None,
context: Context | None = None,
eager_start: bool = False,
) -> None: ...
Expand All @@ -66,12 +66,12 @@ class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportIn
coro: _TaskCompatibleCoro[_T_co],
*,
loop: AbstractEventLoop | None = None,
name: str | None = ...,
name: str | None = None,
context: Context | None = None,
) -> None: ...
else:
def __init__(
self, coro: _TaskCompatibleCoro[_T_co], *, loop: AbstractEventLoop | None = None, name: str | None = ...
self, coro: _TaskCompatibleCoro[_T_co], *, loop: AbstractEventLoop | None = None, name: str | None = None
) -> None: ...

if sys.version_info >= (3, 12):
Expand Down
2 changes: 1 addition & 1 deletion stdlib/_csv.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Dialect:
strict: bool
def __new__(
cls,
dialect: _DialectLike | None = ...,
dialect: _DialectLike | None = None,
delimiter: str = ",",
doublequote: bool = True,
escapechar: str | None = None,
Expand Down
12 changes: 6 additions & 6 deletions stdlib/_curses.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def mouseinterval(interval: int, /) -> None: ...
def mousemask(newmask: int, /) -> tuple[int, int]: ...
def napms(ms: int, /) -> int: ...
def newpad(nlines: int, ncols: int, /) -> window: ...
def newwin(nlines: int, ncols: int, begin_y: int = ..., begin_x: int = ..., /) -> window: ...
def newwin(nlines: int, ncols: int, begin_y: int = 0, begin_x: int = 0, /) -> window: ...
def nl(flag: bool = True, /) -> None: ...
def nocbreak() -> None: ...
def noecho() -> None: ...
Expand Down Expand Up @@ -410,7 +410,7 @@ class window: # undocumented
@overload
def box(self) -> None: ...
@overload
def box(self, vertch: _ChType = ..., horch: _ChType = ...) -> None: ...
def box(self, vertch: _ChType = 0, horch: _ChType = 0) -> None: ...
@overload
def chgat(self, attr: int) -> None: ...
@overload
Expand Down Expand Up @@ -487,9 +487,9 @@ class window: # undocumented
@overload
def insstr(self, y: int, x: int, str: str, attr: int = ...) -> None: ...
@overload
def instr(self, n: int = ...) -> bytes: ...
def instr(self, n: int = 2047) -> bytes: ...
@overload
def instr(self, y: int, x: int, n: int = ...) -> bytes: ...
def instr(self, y: int, x: int, n: int = 2047) -> bytes: ...
def is_linetouched(self, line: int, /) -> bool: ...
def is_wintouched(self) -> bool: ...
def keypad(self, yes: bool, /) -> None: ...
Expand Down Expand Up @@ -523,7 +523,7 @@ class window: # undocumented
@overload
def refresh(self, pminrow: int, pmincol: int, sminrow: int, smincol: int, smaxrow: int, smaxcol: int) -> None: ...
def resize(self, nlines: int, ncols: int) -> None: ...
def scroll(self, lines: int = ...) -> None: ...
def scroll(self, lines: int = 1) -> None: ...
def scrollok(self, flag: bool) -> None: ...
def setscrreg(self, top: int, bottom: int, /) -> None: ...
def standend(self) -> None: ...
Expand All @@ -540,7 +540,7 @@ class window: # undocumented
def syncok(self, flag: bool) -> None: ...
def syncup(self) -> None: ...
def timeout(self, delay: int) -> None: ...
def touchline(self, start: int, count: int, changed: bool = ...) -> None: ...
def touchline(self, start: int, count: int, changed: bool = True) -> None: ...
def touchwin(self) -> None: ...
def untouchwin(self) -> None: ...
@overload
Expand Down
2 changes: 1 addition & 1 deletion stdlib/_dbm.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if sys.platform != "win32":
@overload
def get(self, k: _KeyType, default: _T, /) -> bytes | _T: ...
def keys(self) -> list[bytes]: ...
def setdefault(self, k: _KeyType, default: _ValueType = ..., /) -> bytes: ...
def setdefault(self, k: _KeyType, default: _ValueType = b"", /) -> bytes: ...
# This isn't true, but the class can't be instantiated. See #13024
__new__: None # type: ignore[assignment]
__init__: None # type: ignore[assignment]
Expand Down
16 changes: 8 additions & 8 deletions stdlib/_decimal.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ if sys.version_info >= (3, 11):
def localcontext(
ctx: Context | None = None,
*,
prec: int | None = ...,
rounding: str | None = ...,
Emin: int | None = ...,
Emax: int | None = ...,
capitals: int | None = ...,
clamp: int | None = ...,
traps: dict[_TrapType, bool] | None = ...,
flags: dict[_TrapType, bool] | None = ...,
prec: int | None = None,
rounding: str | None = None,
Emin: int | None = None,
Emax: int | None = None,
capitals: int | None = None,
clamp: int | None = None,
traps: dict[_TrapType, bool] | None = None,
flags: dict[_TrapType, bool] | None = None,
) -> _ContextManager: ...

else:
Expand Down
8 changes: 4 additions & 4 deletions stdlib/_lzma.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ PRESET_EXTREME: Final[int] # v big number
@final
class LZMADecompressor:
if sys.version_info >= (3, 12):
def __new__(cls, format: int | None = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> Self: ...
def __new__(cls, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None) -> Self: ...
else:
def __init__(self, format: int | None = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> None: ...
def __init__(self, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None) -> None: ...

def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes: ...
@property
Expand All @@ -56,11 +56,11 @@ class LZMADecompressor:
class LZMACompressor:
if sys.version_info >= (3, 12):
def __new__(
cls, format: int | None = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
cls, format: int = 1, check: int = -1, preset: int | None = None, filters: _FilterChain | None = None
) -> Self: ...
else:
def __init__(
self, format: int | None = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
self, format: int = 1, check: int = -1, preset: int | None = None, filters: _FilterChain | None = None
) -> None: ...

def compress(self, data: ReadableBuffer, /) -> bytes: ...
Expand Down
14 changes: 7 additions & 7 deletions stdlib/_warnings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ def warn_explicit(
filename: str,
lineno: int,
module: str | None = ...,
registry: dict[str | tuple[str, type[Warning], int], int] | None = ...,
module_globals: dict[str, Any] | None = ...,
source: Any | None = ...,
registry: dict[str | tuple[str, type[Warning], int], int] | None = None,
module_globals: dict[str, Any] | None = None,
source: Any | None = None,
) -> None: ...
@overload
def warn_explicit(
message: Warning,
category: Any,
filename: str,
lineno: int,
module: str | None = ...,
registry: dict[str | tuple[str, type[Warning], int], int] | None = ...,
module_globals: dict[str, Any] | None = ...,
source: Any | None = ...,
module: str | None = None,
registry: dict[str | tuple[str, type[Warning], int], int] | None = None,
module_globals: dict[str, Any] | None = None,
source: Any | None = None,
) -> None: ...
26 changes: 13 additions & 13 deletions stdlib/asyncio/base_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from asyncio.transports import BaseTransport, DatagramTransport, ReadTransport,
from collections.abc import Callable, Iterable, Sequence
from concurrent.futures import Executor, ThreadPoolExecutor
from contextvars import Context
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
from socket import AddressFamily, AddressInfo, SocketKind, _Address, _RetAddress, socket
from typing import IO, Any, Literal, TypeVar, overload
from typing_extensions import TypeAlias, TypeVarTuple, Unpack

Expand Down Expand Up @@ -235,8 +235,8 @@ class BaseEventLoop(AbstractEventLoop):
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = 0,
flags: int = 1,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -254,8 +254,8 @@ class BaseEventLoop(AbstractEventLoop):
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = 0,
flags: int = 1,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -274,8 +274,8 @@ class BaseEventLoop(AbstractEventLoop):
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -292,8 +292,8 @@ class BaseEventLoop(AbstractEventLoop):
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -311,8 +311,8 @@ class BaseEventLoop(AbstractEventLoop):
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -328,8 +328,8 @@ class BaseEventLoop(AbstractEventLoop):
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand Down
28 changes: 14 additions & 14 deletions stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from abc import ABCMeta, abstractmethod
from collections.abc import Callable, Sequence
from concurrent.futures import Executor
from contextvars import Context
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
from socket import AddressFamily, AddressInfo, SocketKind, _Address, _RetAddress, socket
from typing import IO, Any, Literal, Protocol, TypeVar, overload, type_check_only
from typing_extensions import Self, TypeAlias, TypeVarTuple, Unpack, deprecated

Expand Down Expand Up @@ -289,8 +289,8 @@ class AbstractEventLoop:
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -309,8 +309,8 @@ class AbstractEventLoop:
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -330,8 +330,8 @@ class AbstractEventLoop:
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -349,8 +349,8 @@ class AbstractEventLoop:
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -369,8 +369,8 @@ class AbstractEventLoop:
host: str | Sequence[str] | None = None,
port: int = ...,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: None = None,
backlog: int = 100,
ssl: _SSLContext = None,
Expand All @@ -387,8 +387,8 @@ class AbstractEventLoop:
host: None = None,
port: None = None,
*,
family: int = ...,
flags: int = ...,
family: int = AddressFamily.AF_UNSPEC,
flags: int = AddressInfo.AI_PASSIVE,
sock: socket = ...,
backlog: int = 100,
ssl: _SSLContext = None,
Expand Down Expand Up @@ -536,7 +536,7 @@ class AbstractEventLoop:
bufsize: Literal[0] = 0,
encoding: None = None,
errors: None = None,
text: Literal[False] | None = ...,
text: Literal[False] | None = None,
**kwargs: Any,
) -> tuple[SubprocessTransport, _ProtocolT]: ...
@abstractmethod
Expand Down
8 changes: 4 additions & 4 deletions stdlib/asyncio/streams.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if sys.version_info >= (3, 10):
port: int | str | None = None,
*,
limit: int = 65536,
ssl_handshake_timeout: float | None = ...,
ssl_handshake_timeout: float | None = None,
**kwds: Any,
) -> tuple[StreamReader, StreamWriter]: ...
async def start_server(
Expand All @@ -43,7 +43,7 @@ if sys.version_info >= (3, 10):
port: int | str | None = None,
*,
limit: int = 65536,
ssl_handshake_timeout: float | None = ...,
ssl_handshake_timeout: float | None = None,
**kwds: Any,
) -> Server: ...

Expand All @@ -54,7 +54,7 @@ else:
*,
loop: events.AbstractEventLoop | None = None,
limit: int = 65536,
ssl_handshake_timeout: float | None = ...,
ssl_handshake_timeout: float | None = None,
**kwds: Any,
) -> tuple[StreamReader, StreamWriter]: ...
async def start_server(
Expand All @@ -64,7 +64,7 @@ else:
*,
loop: events.AbstractEventLoop | None = None,
limit: int = 65536,
ssl_handshake_timeout: float | None = ...,
ssl_handshake_timeout: float | None = None,
**kwds: Any,
) -> Server: ...

Expand Down
Loading
Loading