Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_reworker.py for the future type to not contain quotes #490

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading