Skip to content

Commit d5c0c9f

Browse files
sunfishcodelukewagner
authored andcommitted
Fix the return type of Task's maybe_next_event.
1 parent 8e501fe commit d5c0c9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

design/mvp/CanonicalABI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ made by async subtasks, streams or futures which are reported to this task by
582582
if (e := self.maybe_next_event()):
583583
return e
584584

585-
def maybe_next_event(self) -> EventTuple:
585+
def maybe_next_event(self) -> Optional[EventTuple]:
586586
while self.events:
587587
event = self.events.pop(0)
588588
if (e := event()):

design/mvp/canonical-abi/definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ async def wait(self, sync) -> EventTuple:
461461
if (e := self.maybe_next_event()):
462462
return e
463463

464-
def maybe_next_event(self) -> EventTuple:
464+
def maybe_next_event(self) -> Optional[EventTuple]:
465465
while self.events:
466466
event = self.events.pop(0)
467467
if (e := event()):

0 commit comments

Comments
 (0)