pyright-python icon indicating copy to clipboard operation
pyright-python copied to clipboard

How are you supposed to set this up for GitHub Actions and other developers

Open bigabig opened this issue 1 year ago • 1 comments

Please, recommend me any working configuration that i can share with other developers of my project and use in GitHub Actions so that the correct python environment is used (which is required? as otherwise no dependencies can be resolved)

bigabig avatar Oct 17 '24 16:10 bigabig

I would suggest using a pre-commit hook: https://github.com/RobertCraigie/pyright-python/pull/334

This extra docs might be of help

seanbudd avatar Feb 26 '25 08:02 seanbudd

Do you have existing CI jobs for your Python environment? If so, you should copy the setup from there and use that when invoking pyright.

The only thing you need to do so that pyright can resolve dependencies correctly is to have your dependencies installed in the same environment as pyright is. Here's an example workflow that this project uses https://github.com/RobertCraigie/pyright-python/blob/7e1526dc0349fedbae25b3b2d0d105ca55a2a8fb/.github/workflows/test.yml#L72

RobertCraigie avatar May 03 '25 16:05 RobertCraigie