-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix strange behaviour of interrogate hook #464
Conversation
Now interrogate should always run on the whole project, as intended.
Codecov Report
@@ Coverage Diff @@
## master #464 +/- ##
======================================
Coverage 68.7% 68.7%
======================================
Files 66 66
Lines 3167 3167
Branches 616 616
======================================
Hits 2176 2176
Misses 860 860
Partials 131 131 Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! |
@@ -43,7 +43,7 @@ repos: | |||
hooks: | |||
- id: interrogate | |||
args: [-vv, --config=pyproject.toml] | |||
exclude: ^(docs|setup.py)|test/|__init__.py | |||
pass_filenames: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation here: https://pre-commit.com/#hooks-pass_filenames
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes interrogate
basically behave like if you would call it from the command line.
And the whole idea behind using interrogate
was, put simply: "Don't add new code if it isn't documented!"
Basically a test coverage for docstrings.
So at some point (close to v1 release) we can use pydocstyle and darglint to have a good and in sync API documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Now interrogate should always run on the whole project, as intended.
This is a known issue when running as pre-commit hook.
Since my projects where I use it have 100% coverage I didn't see that before, so sorry for the problem 😢