Skip to content

Commit

Permalink
Clarify pytest_ignore_collect docs (#12385)
Browse files Browse the repository at this point in the history
Fixes #12383

Co-authored-by: Ran Benita <[email protected]>
  • Loading branch information
nicoddemus and bluetech authored May 28, 2024
1 parent 48cb8a2 commit 9f121e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/_pytest/hookspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,12 @@ def pytest_collection_finish(session: "Session") -> None:
def pytest_ignore_collect(
collection_path: Path, path: "LEGACY_PATH", config: "Config"
) -> Optional[bool]:
"""Return True to prevent considering this path for collection.
"""Return ``True`` to ignore this path for collection.
Return ``None`` to let other plugins ignore the path for collection.
Returning ``False`` will forcefully *not* ignore this path for collection,
without giving a chance for other plugins to ignore this path.
This hook is consulted for all files and directories prior to calling
more specific hooks.
Expand Down

0 comments on commit 9f121e8

Please sign in to comment.