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

Relax shutdown_trigger annotation #149

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

Tinche
Copy link
Contributor

@Tinche Tinche commented Nov 1, 2023

I relaxed the shutdown_trigger annotation to only take an Awaitable (a shorthand for Awaitable[Any], imo more readable and not requiring an import).

I don't think there's a reason for the trigger to be annotated as Awaitable[None] since we don't care about the return value, and it makes it not type-check with an asyncio Event, which is a common use case.

@pgjones
Copy link
Owner

pgjones commented Nov 1, 2023

Thanks

@pgjones pgjones merged commit 19dfb96 into pgjones:main Nov 1, 2023
11 of 13 checks passed
@Tinche Tinche deleted the tin/shutdown-event-typing branch November 1, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants