Skip to content

Commit 266727e

Browse files
committed
Merge branch 'Bump-setuptools-to-76.0.0' of https://github.com/Avasam/typeshed into Bump-setuptools-to-76.0.0
2 parents 4cc1b9e + 6dd7c7b commit 266727e

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

stdlib/asyncio/base_events.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ from asyncio.protocols import BaseProtocol
88
from asyncio.tasks import Task
99
from asyncio.transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport
1010
from collections.abc import Callable, Iterable, Sequence
11+
from concurrent.futures import Executor, ThreadPoolExecutor
1112
from contextvars import Context
1213
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
1314
from typing import IO, Any, Literal, TypeVar, overload
@@ -96,8 +97,8 @@ class BaseEventLoop(AbstractEventLoop):
9697
def call_soon_threadsafe(
9798
self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None
9899
) -> Handle: ...
99-
def run_in_executor(self, executor: Any, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ...
100-
def set_default_executor(self, executor: Any) -> None: ...
100+
def run_in_executor(self, executor: Executor | None, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ...
101+
def set_default_executor(self, executor: ThreadPoolExecutor) -> None: ... # type: ignore[override]
101102
# Network I/O methods returning Futures.
102103
async def getaddrinfo(
103104
self,

stdlib/asyncio/events.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ from _asyncio import (
99
from _typeshed import FileDescriptorLike, ReadableBuffer, StrPath, Unused, WriteableBuffer
1010
from abc import ABCMeta, abstractmethod
1111
from collections.abc import Callable, Sequence
12+
from concurrent.futures import Executor
1213
from contextvars import Context
1314
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
1415
from typing import IO, Any, Literal, Protocol, TypeVar, overload
@@ -188,9 +189,9 @@ class AbstractEventLoop:
188189
def call_soon_threadsafe(self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> Handle: ...
189190

190191
@abstractmethod
191-
def run_in_executor(self, executor: Any, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ...
192+
def run_in_executor(self, executor: Executor | None, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ...
192193
@abstractmethod
193-
def set_default_executor(self, executor: Any) -> None: ...
194+
def set_default_executor(self, executor: Executor) -> None: ...
194195
# Network I/O methods returning Futures.
195196
@abstractmethod
196197
async def getaddrinfo(

stdlib/distutils/cmd.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _CommandT = TypeVar("_CommandT", bound=Command)
3030
_Ts = TypeVarTuple("_Ts")
3131

3232
class Command:
33-
dry_run: Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run
33+
dry_run: bool | Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run
3434
distribution: Distribution
3535
# Any to work around variance issues
3636
sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]

stdlib/distutils/dist.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class Distribution:
8888
display_options: ClassVar[_OptionsList]
8989
display_option_names: ClassVar[list[str]]
9090
negative_opt: ClassVar[dict[str, str]]
91-
verbose: Literal[0, 1]
92-
dry_run: Literal[0, 1]
93-
help: Literal[0, 1]
91+
verbose: bool | Literal[0, 1]
92+
dry_run: bool | Literal[0, 1]
93+
help: bool | Literal[0, 1]
9494
command_packages: list[str] | None
9595
script_name: str | None
9696
script_args: list[str] | None

stubs/networkx/networkx/algorithms/components/connected.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ def number_connected_components(G: Graph[_Node]): ...
1111
@_dispatchable
1212
def is_connected(G: Graph[_Node]): ...
1313
@_dispatchable
14-
def node_connected_component(G: Graph[_Node], n: str): ...
14+
def node_connected_component(G: Graph[_Node], n: _Node): ...

0 commit comments

Comments
 (0)