You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
repos:
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.377
hooks:
- id: pyright
name: pyright
language: system
entry: pyright
types: [python]
args: ["--project", "pyrightconfig.json", "--verbose"]
# args: ["--project=pyrightconfig.json", "--verbose"] # Tried this too
If I run pyright at the project root, I get what I want. If I run pre-commit run pyright I don't get the same behavior at all. The verbose arguments aren't even read. The files that are selected are all the ones in the staged, but I want to restrict pyright on the ones at repo2/src/ only
I guess my real question is: How do I make pre-commit run pyright behave as if I'm running pyright in my own conda environment at the project/ location
The text was updated successfully, but these errors were encountered:
Hello, I've just started using pyright and pre-commit so everything is still new to me and I'm aware the issue is probably because of my inexperience.
My project folder looks like that:
I want pyright to run only on the staged modules that are located at
project/repo2/src/utils/
and nowhere else.My pyrightconfig.json is
My .pre-commit-config.yaml:
If I run
pyright
at the project root, I get what I want. If I runpre-commit run pyright
I don't get the same behavior at all. The verbose arguments aren't even read. The files that are selected are all the ones in the staged, but I want to restrict pyright on the ones atrepo2/src/
onlyI guess my real question is: How do I make
pre-commit run pyright
behave as if I'm runningpyright
in my own conda environment at theproject/
locationThe text was updated successfully, but these errors were encountered: