Fix route handler callable typing#3161
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3161 +/- ##
=========================================
Coverage 87.769% 87.769%
=========================================
Files 105 105
Lines 8152 8152
Branches 1291 1291
=========================================
Hits 7155 7155
Misses 692 692
Partials 305 305 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The failed Linux |
|
Refreshed the current red Linux jobs. GitHub no longer has retrievable logs for the three failed jobs ( I re-ran the changed typing coverage locally:
|
2d942d8 to
03379c5
Compare
Fixes #3159.
Summary
RouteHandlerfromCoroutinetoAwaitableso non-decorator route registration does not trigger mypy's unused coroutine checkapp.get(...)(handler)Testing
python -m pytest tests\typing\test_typing.py -qpython -m pytest tests\test_handler.py -qpython -m ruff check sanic\app.py sanic\models\handler_types.py tests\typing\test_typing.py tests\typing\samples\route_handler_registration.pypython -m ruff format --check sanic\app.py sanic\models\handler_types.py tests\typing\test_typing.py tests\typing\samples\route_handler_registration.pygit diff --check