mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
loop argument for set_event_loop() is optional, it can be None (#2525)
This commit is contained in:
committed by
Sebastian Rittau
parent
703c03e4b0
commit
d43d8a2884
@@ -198,7 +198,7 @@ class AbstractEventLoopPolicy(metaclass=ABCMeta):
|
||||
@abstractmethod
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
@abstractmethod
|
||||
def set_event_loop(self, loop: AbstractEventLoop) -> None: ...
|
||||
def set_event_loop(self, loop: Optional[AbstractEventLoop]) -> None: ...
|
||||
@abstractmethod
|
||||
def new_event_loop(self) -> AbstractEventLoop: ...
|
||||
# Child processes handling (Unix only).
|
||||
@@ -210,14 +210,14 @@ class AbstractEventLoopPolicy(metaclass=ABCMeta):
|
||||
class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy, metaclass=ABCMeta):
|
||||
def __init__(self) -> None: ...
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
def set_event_loop(self, loop: AbstractEventLoop) -> None: ...
|
||||
def set_event_loop(self, loop: Optional[AbstractEventLoop]) -> None: ...
|
||||
def new_event_loop(self) -> AbstractEventLoop: ...
|
||||
|
||||
def get_event_loop_policy() -> AbstractEventLoopPolicy: ...
|
||||
def set_event_loop_policy(policy: AbstractEventLoopPolicy) -> None: ...
|
||||
|
||||
def get_event_loop() -> AbstractEventLoop: ...
|
||||
def set_event_loop(loop: AbstractEventLoop) -> None: ...
|
||||
def set_event_loop(loop: Optional[AbstractEventLoop]) -> None: ...
|
||||
def new_event_loop() -> AbstractEventLoop: ...
|
||||
|
||||
def get_child_watcher() -> Any: ... # TODO: unix_events.AbstractChildWatcher
|
||||
|
||||
Reference in New Issue
Block a user