PyRight pre-commit check failed after bootstrap
smy20011 opened this issue · 1 comments
smy20011 commented
Hey, it seems that pyright cannot resolve path to libraries in pre-commit hook.
/home/deck/.cache/pyright-python/1.1.378/node_modules/pyright/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi:354:33 - error: "str" is not defined (reportUndefinedVariable)
/home/deck/.cache/pyright-python/1.1.378/node_modules/pyright/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi:359:10 - error: Import "enum" could not be resolved (reportMissingImports)
588 errors, 11 warnings, 0 informations
Steps to reproduce:
- git clone https://github.com/BrianPugh/python-template
- cd python-template
- ./bootstrap
- pre-commit run --all-files
I'm running it in arch-linux and python version is 3.12.4
BrianPugh commented
I know it's not very helpful, but it all works fine on my machine 😅 .
It's a bit of a long shot, but try deleting your pyright cache:
rm -rf ~/.cache/pyright-python
And then re-run pre-commit run --all
.