BrianPugh/python-template

PyRight pre-commit check failed after bootstrap

smy20011 opened this issue · 1 comments

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:

  1. git clone https://github.com/BrianPugh/python-template
  2. cd python-template
  3. ./bootstrap
  4. pre-commit run --all-files

I'm running it in arch-linux and python version is 3.12.4

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.