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

Move builtin signals to enum #2309

Merged
merged 3 commits into from Nov 14, 2021
Merged

Move builtin signals to enum #2309

merged 3 commits into from Nov 14, 2021

Conversation

ahopkins
Copy link
Member

This is a convenience to help IDEs and consistency when using builtin signals.

from sanic.signals import Event
@app.signal(Event.HTTP_LIFECYCLE_BEGIN)
async def connect_open(**_):
    logger.debug("connect opened")

@ahopkins ahopkins requested a review from a team as a code owner November 14, 2021 19:17
@codeclimate
Copy link

codeclimate bot commented Nov 14, 2021

Code Climate has analyzed commit 60d0281 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (86% is the threshold).

This pull request will bring the total coverage in the repository to 86.6% (0.0% change).

View more on Code Climate.

@ahopkins ahopkins merged commit 9a9f72a into main Nov 14, 2021
@ahopkins ahopkins deleted the event-enum-builtin-signals branch November 14, 2021 21:21
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
* Move builtin signals to enum

* Fix annotations
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.

None yet

2 participants