Closed linde12 closed 2 months ago
Funny thing is that it finds the pyproject.toml file according to:
Loading pyproject.toml file at /home/REDACTEDNAME/src/REDACTED/pyproject.toml
Assuming Python version 3.12.0.final.0
No include entries specified; assuming /home/REDACTEDNAME/src/REDACTED
Sorry, i see now that pre-commit only ran for REDACTED/REDACTED.py
whereas pyright ran for all files (i forgot to add --all-files
to my pre-commit run
)
I'm having issues with pyright-python where the settings under
[tool.pyright]
are not being picked up when run via pre-commit. Works fine if i add apyrightconfig.json
(although this just seems to pass? no debug output from either pyright or pyright-python is shown), but when usingpyproject.toml
it is unable to find my pyright configuration.My
.pre-commit-config.yaml
looks like this:Output from
poetry run pyright --verbose
withPYRIGHT_PYTHON_DEBUG
env var set (correct, respects my settings inpyproject.toml
and ignores errors insome_dir
):Output from
poetry run pre-commit
withPYRIGHT_PYTHON_DEBUG
env var set (incorrect, does not ignoresome_dir
):I have a
poetry.toml
containing this:and my
pyproject.toml
contains this section:What could be the issue here? Again, if i move the config from
pyproject.toml
to apyrightconfig.json
everything pre-commit seems to just pass without actually caring about the configuration at all (no debug output from either pyright-python or pyright itself)