Add Pyright CI workflow#3647
Conversation
d862119 to
2b72b61
Compare
2b72b61 to
bbfbb55
Compare
bbfbb55 to
0ce13f6
Compare
I think this was the only thing that made me a bit worried. On the github runners tho, that's fine! |
That's understandable :). I am okay with leaving Pyright out of pre-commit and seeing how things go with the CI checks. If the checks become burdensome, we can revisit whether it makes sense to keep them. |
0ce13f6 to
7c87a31
Compare
|
Does this https://github.com/RobertCraigie/pyright-python?tab=readme-ov-file#pre-commit actually need node though? and it seems to work, despite that I don't have node installed |
If you don't have node installed, pyright-python will download a pre-built node binary using nodeenv: I'm not sure if people are okay with that happening behind the scenes :). |
7c87a31 to
c1748d9
Compare
|
Not sure what the concern would be? The downloaded version is only part of the pyright installation and not a system installation no? It'd get frustrating if GH actions keep failing because the changes weren't validated locally first... |
Yeah, it would just be a local installation that isn't visible to any package managers. I think some developers avoid Node.js because of ongoing security issues with packages in the npm repository. Other package managers have similar issues, but the npm ones seem a bit more pervasive. Aside from that, the various caches and downloads from pre-commit are not automatically cleaned up, so you can end up accumulating files in
Agreed. I'm not sure if there's a good way to make certain pre-commit hooks optional either. |
c1748d9 to
2eff176
Compare
2eff176 to
e28505e
Compare
|
Closing this for now. I think additional workflows can be reassessed after ty and Pyrefly (and maybe zuban?) are stabilized. |
PR Description:
I'm submitting a draft PR to see if there's interest in additional CI checks.
I use Pyright locally because it sometimes finds issues that are missed by mypy, ruff, and Pylint. Pyright also has some checks that are not present in other tools, like
reportImportCycles.Benefits:
reportUnnecessaryComparisonandreportImportCyclespyproject.tomlprovides better on-the-fly IDE checks for developers who use VS Code + Pyright/PylanceDrawbacks: