interrogate icon indicating copy to clipboard operation
interrogate copied to clipboard

"exclude" does not exclude files if passed in via args

Open estahn opened this issue 2 years ago • 1 comments

Environment

  • interrogate version(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?

estahn avatar Jul 20 '23 09:07 estahn

See https://github.com/econchick/interrogate/pull/159

jimrybarski avatar Oct 24 '23 12:10 jimrybarski