Pyright's official documentation now refers to a community-maintained Python package, pyright. This might solve the problem below. Note thought that we still need to turn this into a local hook, just like mypy, because the proposed solution is not generic enough.
- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: system
require_serial: true
types:
- python
Update
The pyright Python package builds node locally. This takes a long time and if you break the process, there will be a corrupted build folder under ~/.cache/pyright-python/nodeenv and you will be unable to run pyright again. To fix this problem:
The pyright pre-commit hook seems not to work in the tox -e sty job (all of the ComPWA repos). This is a pity, because now it's not possible to run all CI locally with tox -p.
Closing this for now due to the build speed if NodeJS is not installed. This is not only annoying locally, but also works against pre-commit caching on GitHub Actions.
Pyright's official documentation now refers to a community-maintained Python package,
pyright
. This might solve the problem below. Note thought that we still need to turn this into a local hook, just likemypy
, because the proposed solution is not generic enough.Update
The
pyright
Python package buildsnode
locally. This takes a long time and if you break the process, there will be a corrupted build folder under~/.cache/pyright-python/nodeenv
and you will be unable to runpyright
again. To fix this problem:and rerun
pyright
.