Repository navigation
chore(typing): extend Pyright checks to sample apps - #2791
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2791 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 8121 8121
Branches 1131 1131
=========================================
Hits 8121 8121 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vytas7
left a comment
There was a problem hiding this comment.
Hi @Lbragaa , and thanks for this PR.
The change itself looks good, but let's revert the CONTRIBUTING.md change, Pyright is not our primary way of checking things, so it would be grabbing too much attention in that already crowded file.
Also, let's condense the new command line not to use the list, maybe you could group it into two lines, following the previous precedent, one checking the three example files, and the other checking the WS tutorial?
|
Thanks for the review @vytas7! I reverted the CONTRIBUTING.md changes and split the Pyright checks into two commands: one for the three standalone examples and one for the WebSocket tutorial. The Pyright checks and full tox run passed locally. |
Summary of Changes
Extend the existing
pyright_testsenvironment to check four sample applications. One Pyright command checks the three standalone examples together:examples/quote.pyexamples/things.pyexamples/things_asgi.pyA separate command checks the WebSocket tutorial at
examples/ws_tutorial/ws_tutorial/app.py. The environment installs Uvicorn because the tutorial imports it.The examples exercise Falcon's public types in WSGI, ASGI, and WebSocket apps. This follows the sample-app approach suggested in #2379 and builds on #2650. The existing GitHub Actions job runs these checks as part of
pyright_tests.This is partial progress toward #2373. The change only affects development checks, so a news fragment is not needed.
Validation
On Windows with CPython 3.14.6:
resp.statusproduced the expected Pyright error.The local test suites used pytest 9.1.1 because pytest 9.2.0's output capture conflicts with an existing static-file test mock. One Uvicorn shutdown timed out during the first full run after the review edits. That test passed individually and on the full rerun.
AI Assistance
I used an AI coding assistant to help implement this change and run automated checks.
Related Issues
Refs #2373.
Pull Request Checklist
tox.docs/.docs/.versionadded,versionchanged, ordeprecateddirectives.docs/_newsfragments/, with the file name format{issue_number}.{fragment_type}.rst.