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

Allow for simple signals #2813

Merged
merged 7 commits into from
Dec 5, 2023
Merged

Allow for simple signals #2813

merged 7 commits into from
Dec 5, 2023

Conversation

ahopkins
Copy link
Member

The point of this PR is to allow for definition and use of simple signals. Sometimes, you do not need the full three part scheme.

@app.signal("<thing>")
async def handler(**kwargs):
    print("foobar signal received")
    print(kwargs)


@app.route("/")
async def test(request: Request):
    await request.app.dispatch("foobar")
    return json({"hello": "world"})

@ahopkins ahopkins marked this pull request as ready for review November 28, 2023 19:24
@ahopkins ahopkins requested a review from a team as a code owner November 28, 2023 19:24
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7d93c10) 88.348% compared to head (02314fb) 88.244%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2813       +/-   ##
=============================================
- Coverage   88.348%   88.244%   -0.105%     
=============================================
  Files           92        92               
  Lines         7175      7188       +13     
  Branches      1232      1234        +2     
=============================================
+ Hits          6339      6343        +4     
- Misses         581       589        +8     
- Partials       255       256        +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahopkins ahopkins merged commit e4239a8 into main Dec 5, 2023
26 checks passed
@ahopkins ahopkins deleted the simple-signals branch December 5, 2023 10:07
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

1 participant