-
Notifications
You must be signed in to change notification settings - Fork 162
Add pyright type-checking #1172
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
base: main
Are you sure you want to change the base?
Conversation
I'll close this for now, there's an issue with pyright and pre-commit CI: RobertCraigie/pyright-python#345 |
Rather than running pyright in pre-commit, we can consider running it in a dedicated tox environment. This would give us the benefit of having a pyright check for the code base, while 90% of typing issues should still be caught by the mypy pre-commit hook. @tjkuson Do you think this approach would side-step the issue? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1172 +/- ##
==========================================
+ Coverage 88.16% 88.88% +0.72%
==========================================
Files 2 2
Lines 397 405 +8
Branches 44 44
==========================================
+ Hits 350 360 +10
Misses 35 35
+ Partials 12 10 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@seifertm I've moved the pyright check from pre-commit to tox and re-opened the PR. |
Hello, I was working with this plugin and encountered this issue.
I added pyright as a tox test matching the mypy hook.
This reveals one error involving
function.parent
possibly beingNone
. I resolved this by adding an assertion, as that appears to be most consistent with the rest of the codebase.Closes #731