Skip to content

Commit 1d103e5

Browse files
[8.2.x] Clarify pytest_ignore_collect docs (#12386)
Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 240a252 commit 1d103e5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/_pytest/hookspec.py

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

0 commit comments

Comments
 (0)