Skip to content

Commit

Permalink
Update test_reworker.py for the future type to not contain quotes (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed May 31, 2024
1 parent dbe9634 commit 49dfb08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/worker/test_reworker.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,15 @@ def assert_running_count_plan_produces_ordered_worker_and_data_events(
def take_n_events(
stream: EventStream[E, Any],
num: int,
) -> "Future[list[E]]":
) -> Future[list[E]]:
count = itertools.count()
return take_events(stream, lambda _: next(count) >= num)


def take_events(
stream: EventStream[E, Any],
cutoff_predicate: Callable[[E], bool],
) -> "Future[list[E]]":
) -> Future[list[E]]:
events: list[E] = []
future: Future[list[E]] = Future()

Expand All @@ -405,7 +405,7 @@ def on_event(event: E, event_id: str | None) -> None:
def take_events_from_streams(
streams: list[EventStream[Any, int]],
cutoff_predicate: Callable[[Any], bool],
) -> "Future[list[Any]]":
) -> Future[list[Any]]:
"""Returns a collated list of futures for events in numerous event streams.
The support for generic and algebraic types doesn't appear to extend to
Expand Down

0 comments on commit 49dfb08

Please sign in to comment.