interrogate
interrogate copied to clipboard
"exclude" does not exclude files if passed in via args
Environment
interrogateversion(s) (interrogate --version:- Operating System(s):
- Python version(s):
Description of the bug
I'm planning on using interrogate as part of our CI/CD process. Thus I will run the following for a PR, only checking files that have changed:
interrogate -c pyproject.toml -vv $(gh pr view NUMBER --json files --jq '.files | map(select(.path | endswith(".py"))) | .[].path')
pyproject.toml contains exclude definitions which are not adhered to if files are passed into via args.
What you expected to happen
[tool.interrogate]
exclude = ["test.py"]
interrogate -c pyproject.tom -vv test.py
E: No Python files found to interrogate
How to reproduce (as minimally and precisely as possible)
touch test.py
echo "[tool.interrogate]\nexclude = [\"test.py\"]" > pyproject.toml
interrogate -c pyproject.toml -vv test.py
Anthing else we need to know?
See https://github.com/econchick/interrogate/pull/159