Skip to content

Commit 9f121e8

Browse files
nicoddemusbluetech
andauthored
Clarify pytest_ignore_collect docs (#12385)
Fixes #12383 Co-authored-by: Ran Benita <[email protected]>
1 parent 48cb8a2 commit 9f121e8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/_pytest/hookspec.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,12 @@ def pytest_collection_finish(session: "Session") -> None:
311311
def pytest_ignore_collect(
312312
collection_path: Path, path: "LEGACY_PATH", config: "Config"
313313
) -> Optional[bool]:
314-
"""Return True to prevent considering this path for collection.
314+
"""Return ``True`` to ignore this path for collection.
315+
316+
Return ``None`` to let other plugins ignore the path for collection.
317+
318+
Returning ``False`` will forcefully *not* ignore this path for collection,
319+
without giving a chance for other plugins to ignore this path.
315320
316321
This hook is consulted for all files and directories prior to calling
317322
more specific hooks.

0 commit comments

Comments
 (0)