econchick / interrogate

Explain yourself! Interrogate a codebase for docstring coverage.
https://interrogate.readthedocs.io
MIT License
562 stars 46 forks source link

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

Closed estahn closed 3 months ago

estahn commented 11 months ago

Environment

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?

jimrybarski commented 8 months ago

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