Fix pytest_ignore_collect hook implementation to return None rather than False when the path ought not to be ignored. This is necessary to enable the default pytest implementation of pytest_ignore_collect() to be used. Otherwise, the default rules are never applied and e.g. --ignore does not work.
If this is a user-facing code change, like a bugfix or a new feature, please ensure that
you've fulfilled the following conditions (where applicable):
[ ] You've added tests (in tests/) added which would fail without your patch
[ ] You've updated the documentation (in docs/, in case of behavior changes or new
features)
[ ] You've added a new changelog entry (in docs/versionhistory.rst).
If this is a trivial change, like a typo fix or a code reformatting, then you can ignore
these instructions.
Updating the changelog
If there are no entries after the last release, use **UNRELEASED** as the version.
If, say, your patch fixes issue #999, the entry should look like this:
* Fix big bad boo-boo in the pytest plugin (#999 <https://github.com/agronholm/typeguard/issues/999>_; PR by @yourgithubaccount)
If there's no issue linked, just link to your pull request instead by updating the
changelog after you've created the PR.
coverage: 94.139%. remained the same
when pulling 4e2871379b0ab6cc0f23cb26dd891c6873418fe9 on mgorny:pytest-collect-ignore
into 016f8139f5a0a63147d68df9558cc5584cd2c49a on agronholm:master.
Changes
Fix
pytest_ignore_collect
hook implementation to returnNone
rather thanFalse
when the path ought not to be ignored. This is necessary to enable the default pytest implementation ofpytest_ignore_collect()
to be used. Otherwise, the default rules are never applied and e.g.--ignore
does not work.I've also reported https://github.com/pytest-dev/pytest/issues/12383 about the misleading documentation.
Checklist
If this is a user-facing code change, like a bugfix or a new feature, please ensure that you've fulfilled the following conditions (where applicable):
tests/
) added which would fail without your patchdocs/
, in case of behavior changes or new features)docs/versionhistory.rst
).If this is a trivial change, like a typo fix or a code reformatting, then you can ignore these instructions.
Updating the changelog
If there are no entries after the last release, use
**UNRELEASED**
as the version. If, say, your patch fixes issue #999, the entry should look like this:* Fix big bad boo-boo in the pytest plugin (#999 <https://github.com/agronholm/typeguard/issues/999>_; PR by @yourgithubaccount)
If there's no issue linked, just link to your pull request instead by updating the changelog after you've created the PR.