loop argument for set_event_loop() is optional, it can be None (#2525)

This commit is contained in:
Andrew Svetlov
2018-10-18 15:24:54 +03:00
committed by Sebastian Rittau
parent 703c03e4b0
commit d43d8a2884

View File

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